diff --git a/Dockerfile b/Dockerfile index 2a33ee7f45..54c1ccc978 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ ARG REMOTE_DEBUGGING=0 FROM golang:1.20-bullseye AS build ARG RUN_TEST=0 -ARG BUILD_TAGS=rocksdb +ARG BUILD_TAGS=rocksdb,fakemutex # Define second time inside the build stage to work in bash conditions. ARG REMOTE_DEBUGGING=0 diff --git a/client/evilwallet/connector.go b/client/evilwallet/connector.go index d7fd0bc0e0..c2e64c9867 100644 --- a/client/evilwallet/connector.go +++ b/client/evilwallet/connector.go @@ -1,7 +1,6 @@ package evilwallet import ( - "sync" "time" "github.com/iotaledger/goshimmer/client" @@ -14,6 +13,7 @@ import ( "github.com/iotaledger/goshimmer/packages/protocol/models" "github.com/iotaledger/hive.go/core/slot" "github.com/iotaledger/hive.go/crypto/identity" + "github.com/iotaledger/hive.go/runtime/syncutils" ) type ServersStatus []*wallet.ServerStatus @@ -47,7 +47,7 @@ type WebClients struct { // helper variable indicating which clt was recently used, useful for double, triple,... spends lastUsed int - mu sync.Mutex + mu syncutils.Mutex } // NewWebClients creates Connector from provided GoShimmerAPI urls. diff --git a/go.mod b/go.mod index e692ee4756..c33c751885 100644 --- a/go.mod +++ b/go.mod @@ -13,20 +13,20 @@ require ( github.com/go-resty/resty/v2 v2.6.0 github.com/google/uuid v1.3.0 github.com/gorilla/websocket v1.4.2 - github.com/iotaledger/hive.go/ads v0.0.0-20230417125513-e2e89991217f - github.com/iotaledger/hive.go/app v0.0.0-20230417125513-e2e89991217f - github.com/iotaledger/hive.go/autopeering v0.0.0-20230417125513-e2e89991217f - github.com/iotaledger/hive.go/constraints v0.0.0-20230417125513-e2e89991217f - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230417125513-e2e89991217f - github.com/iotaledger/hive.go/crypto v0.0.0-20230417125513-e2e89991217f - github.com/iotaledger/hive.go/ds v0.0.0-20230417125513-e2e89991217f - github.com/iotaledger/hive.go/kvstore v0.0.0-20230417125513-e2e89991217f - github.com/iotaledger/hive.go/lo v0.0.0-20230417125513-e2e89991217f - github.com/iotaledger/hive.go/logger v0.0.0-20230417125513-e2e89991217f - github.com/iotaledger/hive.go/objectstorage v0.0.0-20230417125513-e2e89991217f - github.com/iotaledger/hive.go/runtime v0.0.0-20230417125513-e2e89991217f - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230417125513-e2e89991217f - github.com/iotaledger/hive.go/stringify v0.0.0-20230417125513-e2e89991217f + github.com/iotaledger/hive.go/ads v0.0.0-20230425063402-a1a1712d13a2 + github.com/iotaledger/hive.go/app v0.0.0-20230425063402-a1a1712d13a2 + github.com/iotaledger/hive.go/autopeering v0.0.0-20230425063402-a1a1712d13a2 + github.com/iotaledger/hive.go/constraints v0.0.0-20230425063402-a1a1712d13a2 + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230425063402-a1a1712d13a2 + github.com/iotaledger/hive.go/crypto v0.0.0-20230425063402-a1a1712d13a2 + github.com/iotaledger/hive.go/ds v0.0.0-20230425063402-a1a1712d13a2 + github.com/iotaledger/hive.go/kvstore v0.0.0-20230425063402-a1a1712d13a2 + github.com/iotaledger/hive.go/lo v0.0.0-20230425063402-a1a1712d13a2 + github.com/iotaledger/hive.go/logger v0.0.0-20230425063402-a1a1712d13a2 + github.com/iotaledger/hive.go/objectstorage v0.0.0-20230425063402-a1a1712d13a2 + github.com/iotaledger/hive.go/runtime v0.0.0-20230425063402-a1a1712d13a2 + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230425063402-a1a1712d13a2 + github.com/iotaledger/hive.go/stringify v0.0.0-20230425063402-a1a1712d13a2 github.com/jellydator/ttlcache/v2 v2.11.1 github.com/labstack/echo/v4 v4.10.0 github.com/libp2p/go-libp2p v0.27.1 @@ -68,7 +68,7 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/elastic/gosigar v0.14.2 // indirect - github.com/ethereum/go-ethereum v1.11.5 // indirect + github.com/ethereum/go-ethereum v1.11.6 // indirect github.com/fatih/structs v1.1.0 // indirect github.com/flynn/noise v1.0.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect @@ -82,7 +82,7 @@ require ( github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/gopacket v1.1.19 // indirect github.com/google/pprof v0.0.0-20230405160723-4a4c7d95572b // indirect github.com/hashicorp/hcl v1.0.0 // indirect diff --git a/go.sum b/go.sum index 49532af8f1..024d808a89 100644 --- a/go.sum +++ b/go.sum @@ -183,8 +183,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/ethereum/go-ethereum v1.11.5 h1:3M1uan+LAUvdn+7wCEFrcMM4LJTeuxDrPTg/f31a5QQ= -github.com/ethereum/go-ethereum v1.11.5/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= +github.com/ethereum/go-ethereum v1.11.6 h1:2VF8Mf7XiSUfmoNOy3D+ocfl9Qu8baQBrCNbo2CXQ8E= +github.com/ethereum/go-ethereum v1.11.6/go.mod h1:+a8pUj1tOyJ2RinsNQD4326YS+leSoKGiG/uVVb0x6Y= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= @@ -331,8 +331,8 @@ 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.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -428,7 +428,7 @@ github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/hjson/hjson-go/v4 v4.0.0 h1:wlm6IYYqHjOdXH1gHev4VoXCaW20HdQAGCxdOEEg2cs= github.com/hjson/hjson-go/v4 v4.0.0/go.mod h1:KaYt3bTw3zhBjYqnXkYywcYctk0A2nxeEFTse3rH13E= -github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= +github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c h1:DZfsyhDK1hnSS5lH8l+JggqzEleHteTYfutAiVlSUM8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goupnp v1.1.0 h1:gEe0Dp/lZmPZiDFzJJaOfUpOvv2MKUkoBX8lDrn9vKU= @@ -445,34 +445,34 @@ github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/C github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PTNgli6EbS4tV9qu3QAm/kBU3XaYZV2xdzys= github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw= -github.com/iotaledger/hive.go/ads v0.0.0-20230417125513-e2e89991217f h1:plS7qPSBQZvxaUWm53sMOrv5jC83Bki1CJbhAnLXf9Y= -github.com/iotaledger/hive.go/ads v0.0.0-20230417125513-e2e89991217f/go.mod h1:wPxiUI/+jRqeHm/WQO70agvAWeouxzlkha0CkCpCNjs= -github.com/iotaledger/hive.go/app v0.0.0-20230417125513-e2e89991217f h1:7KxnUM6z9qjNPJThLCCneQAAtqMDcnfv/nDh78qgFRM= -github.com/iotaledger/hive.go/app v0.0.0-20230417125513-e2e89991217f/go.mod h1:vMXrLYkkHAqQC8yGLXcB1Adq9s3hPPf8Dv4sfd/koas= -github.com/iotaledger/hive.go/autopeering v0.0.0-20230417125513-e2e89991217f h1:a6SK3bEMe6/eP0++EMljy3Ldgn7XLwsXKU9sLBXh3dM= -github.com/iotaledger/hive.go/autopeering v0.0.0-20230417125513-e2e89991217f/go.mod h1:WDIeFSOpeEL1MNSQBlWr0FgIxke+UlrYJ37ncQP+Fl0= -github.com/iotaledger/hive.go/constraints v0.0.0-20230417125513-e2e89991217f h1:CmfPv23a32gSf3iYx0LAHRKZydt9hPgnRTknR85Cles= -github.com/iotaledger/hive.go/constraints v0.0.0-20230417125513-e2e89991217f/go.mod h1:bvXXc6quBdERMMKnirr2+iQU4WnTz4KDbdHcusW9Ats= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230417125513-e2e89991217f h1:qjwpHDPMAq0BLVol8lWylMPFE/tSKTl6xDR1mBnUoAE= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230417125513-e2e89991217f/go.mod h1:DG3Z4F+nBNapmU3RaWUS/5YUtqzaj/EclUkRrV74rV4= -github.com/iotaledger/hive.go/crypto v0.0.0-20230417125513-e2e89991217f h1:fUUKFqf2SBBqHffRYqML+aoCwzw5s+9QmTV3nB+EydM= -github.com/iotaledger/hive.go/crypto v0.0.0-20230417125513-e2e89991217f/go.mod h1:xp9Wbk2vp4LHb0xTbDRphSJLgLYvRNNe5lWHd8OLI5c= -github.com/iotaledger/hive.go/ds v0.0.0-20230417125513-e2e89991217f h1:LQxEzB+w5aC+wdjz2AYAwzwJz0gars8Ibuau4EYSxL8= -github.com/iotaledger/hive.go/ds v0.0.0-20230417125513-e2e89991217f/go.mod h1:wwPP73b6InomUeirqEfaYNqoTsuzxNZPa/ci4efzuyU= -github.com/iotaledger/hive.go/kvstore v0.0.0-20230417125513-e2e89991217f h1:G074X16SOzjiBJtQkIfAvjm+dX8T4IhvztyK81V8uro= -github.com/iotaledger/hive.go/kvstore v0.0.0-20230417125513-e2e89991217f/go.mod h1:oET9GdiN58SWw+INHuNwmiBlfmfRyoe1cJMx7TYk1Js= -github.com/iotaledger/hive.go/lo v0.0.0-20230417125513-e2e89991217f h1:Q1MM9T6zE9iXk6QtUgqGzxuk9j7pNapbB0iD+39VNNA= -github.com/iotaledger/hive.go/lo v0.0.0-20230417125513-e2e89991217f/go.mod h1:dsAfSt53PGgT3n675q2wFLGcvRlLNS3Affhf+vnFbb4= -github.com/iotaledger/hive.go/logger v0.0.0-20230417125513-e2e89991217f h1:i0Hyuamj1iRRixOusCCMlHkHR/NAs9+cv/lFUV94kts= -github.com/iotaledger/hive.go/logger v0.0.0-20230417125513-e2e89991217f/go.mod h1:7ZE+E8JgqJ9zxg5/FOObEfYyBpC813TMv6Qzcm2YekY= -github.com/iotaledger/hive.go/objectstorage v0.0.0-20230417125513-e2e89991217f h1:10ZUosNi8HCD7KyWWm2kocacqCj52l/yGlOVYNgJRSA= -github.com/iotaledger/hive.go/objectstorage v0.0.0-20230417125513-e2e89991217f/go.mod h1:E7/slsvlTsSP+laCKWbBOmSPg83UTh9mPm8ostFOlv4= -github.com/iotaledger/hive.go/runtime v0.0.0-20230417125513-e2e89991217f h1:c3PjrBnD26nlUOPlBlF1dS4sv1LN5ndJqfUvWwO9jwQ= -github.com/iotaledger/hive.go/runtime v0.0.0-20230417125513-e2e89991217f/go.mod h1:kYmuL6D9aDLqLpskEEC+DGKXC/9mx7wtLF0WItRuexs= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230417125513-e2e89991217f h1:tUw+oQKBsM67QeI3dGKhb7p/ziZ35+pgN9fu8W06UFY= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230417125513-e2e89991217f/go.mod h1:NrZTRu5hrKwSxzPyA5G8BxaQakOLRvoFJM+5vtHDE04= -github.com/iotaledger/hive.go/stringify v0.0.0-20230417125513-e2e89991217f h1:C2AIi1lpQieqa5piGeJN0byheffJNF0aMiiyUujU1b8= -github.com/iotaledger/hive.go/stringify v0.0.0-20230417125513-e2e89991217f/go.mod h1:l/F3cA/+67QdNj+sohv2v4HhmsdOcWScoA+sVYoAE4c= +github.com/iotaledger/hive.go/ads v0.0.0-20230425063402-a1a1712d13a2 h1:XwuBd2W1VcAwMfgLJP5WJCo4d9b7ssXB2aongJAaY9g= +github.com/iotaledger/hive.go/ads v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:wPxiUI/+jRqeHm/WQO70agvAWeouxzlkha0CkCpCNjs= +github.com/iotaledger/hive.go/app v0.0.0-20230425063402-a1a1712d13a2 h1:Z2x8TvwMUUbCrk1SDU99Ij+/WbpiuFB8RTrIKToyaxw= +github.com/iotaledger/hive.go/app v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:vMXrLYkkHAqQC8yGLXcB1Adq9s3hPPf8Dv4sfd/koas= +github.com/iotaledger/hive.go/autopeering v0.0.0-20230425063402-a1a1712d13a2 h1:PREknjsj8V4sMVD3sR6+fEb/sOeYf07En+OSFp6yGjg= +github.com/iotaledger/hive.go/autopeering v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:WDIeFSOpeEL1MNSQBlWr0FgIxke+UlrYJ37ncQP+Fl0= +github.com/iotaledger/hive.go/constraints v0.0.0-20230425063402-a1a1712d13a2 h1:lp4PmIk2lJoPbIXs25n7Hyb0Q8BSGRWfxnWVhX7z6l0= +github.com/iotaledger/hive.go/constraints v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:bvXXc6quBdERMMKnirr2+iQU4WnTz4KDbdHcusW9Ats= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230425063402-a1a1712d13a2 h1:RH1NTY0HfBCRp88px8qZ7Cn28R3mTt/1yDRxNwKCHhc= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230425063402-a1a1712d13a2/go.mod h1:DG3Z4F+nBNapmU3RaWUS/5YUtqzaj/EclUkRrV74rV4= +github.com/iotaledger/hive.go/crypto v0.0.0-20230425063402-a1a1712d13a2 h1:gukBhOoK7NdjTGSiWc+ixDipNycWIiRLjxTB7oaGm0g= +github.com/iotaledger/hive.go/crypto v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:xp9Wbk2vp4LHb0xTbDRphSJLgLYvRNNe5lWHd8OLI5c= +github.com/iotaledger/hive.go/ds v0.0.0-20230425063402-a1a1712d13a2 h1:UJ2/JF5OpkLjA7rSTFPf0SO1mwCYWvxCqRm0u4ePPWU= +github.com/iotaledger/hive.go/ds v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:wwPP73b6InomUeirqEfaYNqoTsuzxNZPa/ci4efzuyU= +github.com/iotaledger/hive.go/kvstore v0.0.0-20230425063402-a1a1712d13a2 h1:0w+4/SXRRQSKS/w7eqPdw/tueymY/W4mZG5eJRBv7Fo= +github.com/iotaledger/hive.go/kvstore v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:oET9GdiN58SWw+INHuNwmiBlfmfRyoe1cJMx7TYk1Js= +github.com/iotaledger/hive.go/lo v0.0.0-20230425063402-a1a1712d13a2 h1:RzyniGJR0ydfc6ZyfzCLrTlef6N4Y2wpzsc+pYSjog8= +github.com/iotaledger/hive.go/lo v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:dsAfSt53PGgT3n675q2wFLGcvRlLNS3Affhf+vnFbb4= +github.com/iotaledger/hive.go/logger v0.0.0-20230425063402-a1a1712d13a2 h1:wnCXalueu/SfiISMTeAKXlxl9AiZQLUo/4HdP+BuZDc= +github.com/iotaledger/hive.go/logger v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:7ZE+E8JgqJ9zxg5/FOObEfYyBpC813TMv6Qzcm2YekY= +github.com/iotaledger/hive.go/objectstorage v0.0.0-20230425063402-a1a1712d13a2 h1:UhivYtaraLed69zqyfDVfxzdfZsqrYemGQrK2VVmYeM= +github.com/iotaledger/hive.go/objectstorage v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:E7/slsvlTsSP+laCKWbBOmSPg83UTh9mPm8ostFOlv4= +github.com/iotaledger/hive.go/runtime v0.0.0-20230425063402-a1a1712d13a2 h1:8rpKh1ePJsEDEzWdDstS10zisik03DaElmcIS9Rl464= +github.com/iotaledger/hive.go/runtime v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:kYmuL6D9aDLqLpskEEC+DGKXC/9mx7wtLF0WItRuexs= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230425063402-a1a1712d13a2 h1:dIe9DBZ9R1tdjDcdaiOO6+AjvnryLerQZpmqAg/5LYU= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230425063402-a1a1712d13a2/go.mod h1:NrZTRu5hrKwSxzPyA5G8BxaQakOLRvoFJM+5vtHDE04= +github.com/iotaledger/hive.go/stringify v0.0.0-20230425063402-a1a1712d13a2 h1:6FRZKhOiQEGhnrvS1uYdrCc+f9FIqiuUd7odspJJYVc= +github.com/iotaledger/hive.go/stringify v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:l/F3cA/+67QdNj+sohv2v4HhmsdOcWScoA+sVYoAE4c= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= diff --git a/packages/app/retainer/metadata.go b/packages/app/retainer/metadata.go index 4a25ee710f..dbf28934b7 100644 --- a/packages/app/retainer/metadata.go +++ b/packages/app/retainer/metadata.go @@ -29,7 +29,7 @@ type cachedMetadata struct { Acceptance *blockWithTime[*blockgadget.Block] Confirmation *blockWithTime[*blockgadget.Block] - syncutils.RWMutexFake + syncutils.RWMutex } func newCachedMetadata() *cachedMetadata { diff --git a/packages/core/commitment/id.go b/packages/core/commitment/id.go index 8d06e27e15..21e569ed78 100644 --- a/packages/core/commitment/id.go +++ b/packages/core/commitment/id.go @@ -144,5 +144,5 @@ var ( _IDAliases = make(map[ID]string) // _IDAliasesMutex is the mutex that is used to synchronize access to the previous map. - _IDAliasesMutex = syncutils.RWMutexFake{} + _IDAliasesMutex = syncutils.RWMutex{} ) diff --git a/packages/core/database/manager.go b/packages/core/database/manager.go index c902579775..22f9e7c380 100644 --- a/packages/core/database/manager.go +++ b/packages/core/database/manager.go @@ -6,7 +6,6 @@ import ( "path/filepath" "sort" "strconv" - "sync" "github.com/pkg/errors" "github.com/zyedidia/generic/cache" @@ -29,10 +28,10 @@ type Manager struct { openDBs *cache.Cache[slot.Index, *dbInstance] bucketedBaseDir string dbSizes *shrinkingmap.ShrinkingMap[slot.Index, int64] - openDBsMutex sync.Mutex + openDBsMutex syncutils.Mutex maxPruned slot.Index - maxPrunedMutex syncutils.RWMutexFake + maxPrunedMutex syncutils.RWMutex // The granularity of the DB instances (i.e. how many buckets/slots are stored in one DB). optsGranularity int64 diff --git a/packages/core/latestblocktracker/latestblocktracker.go b/packages/core/latestblocktracker/latestblocktracker.go index 85bf3a40e0..ce57f4ae27 100644 --- a/packages/core/latestblocktracker/latestblocktracker.go +++ b/packages/core/latestblocktracker/latestblocktracker.go @@ -11,7 +11,7 @@ import ( type LatestBlockTracker struct { blockID models.BlockID time time.Time - mutex syncutils.RWMutexFake + mutex syncutils.RWMutex } // New return a new LatestBlockTracker. diff --git a/packages/core/traits/batchcommittable.go b/packages/core/traits/batchcommittable.go index 1440c6fe9f..180eb9e022 100644 --- a/packages/core/traits/batchcommittable.go +++ b/packages/core/traits/batchcommittable.go @@ -36,7 +36,7 @@ type batchCommittable struct { batchSlot slot.Index // batchSlotMutex is used to synchronize access to batchSlot. - batchSlotMutex syncutils.RWMutexFake + batchSlotMutex syncutils.RWMutex // Committable is the underlying committable trait. Committable diff --git a/packages/core/votes/latestvotes/latestvotes.go b/packages/core/votes/latestvotes/latestvotes.go index c504eaa25a..9b8ead2f6a 100644 --- a/packages/core/votes/latestvotes/latestvotes.go +++ b/packages/core/votes/latestvotes/latestvotes.go @@ -15,7 +15,7 @@ type LatestVotes[EntityIndex constraints.Integer, VotePowerType constraints.Comp voter identity.ID t *thresholdmap.ThresholdMap[EntityIndex, VotePowerType] - m syncutils.RWMutexFake + m syncutils.RWMutex } // NewLatestVotes creates a new NewLatestVotes instance associated with the given details. diff --git a/packages/core/votes/vote.go b/packages/core/votes/vote.go index e9db7155c7..3c1b64e933 100644 --- a/packages/core/votes/vote.go +++ b/packages/core/votes/vote.go @@ -59,7 +59,7 @@ func (v *Vote[ConflictIDType, VotePowerType]) WithVotePower(power VotePowerType) type Votes[ConflictIDType comparable, VotePowerType constraints.Comparable[VotePowerType]] struct { o orderedmap.OrderedMap[identity.ID, *Vote[ConflictIDType, VotePowerType]] - m syncutils.RWMutexFake + m syncutils.RWMutex } func NewVotes[ConflictIDType comparable, VotePowerType constraints.Comparable[VotePowerType]]() *Votes[ConflictIDType, VotePowerType] { diff --git a/packages/network/manualpeering/manualpeering.go b/packages/network/manualpeering/manualpeering.go index bf4f6253ad..be7cb4efd8 100644 --- a/packages/network/manualpeering/manualpeering.go +++ b/packages/network/manualpeering/manualpeering.go @@ -72,10 +72,10 @@ type Manager struct { startOnce sync.Once isStarted atomic.Bool stopOnce sync.Once - stopMutex syncutils.RWMutexFake + stopMutex syncutils.RWMutex isStopped bool reconnectInterval time.Duration - knownPeersMutex syncutils.RWMutexFake + knownPeersMutex syncutils.RWMutex knownPeers map[identity.ID]*knownPeer workerPool *workerpool.WorkerPool diff --git a/packages/network/p2p/manager.go b/packages/network/p2p/manager.go index 4ebf94b0a8..aceef50c5f 100644 --- a/packages/network/p2p/manager.go +++ b/packages/network/p2p/manager.go @@ -53,7 +53,7 @@ type Manager struct { local *peer.Local libp2pHost host.Host - acceptMutex syncutils.RWMutexFake + acceptMutex syncutils.RWMutex acceptMap map[libp2ppeer.ID]*AcceptMatcher log *logger.Logger @@ -62,9 +62,9 @@ type Manager struct { isStopped atomic.Bool neighbors map[identity.ID]*Neighbor - neighborsMutex syncutils.RWMutexFake + neighborsMutex syncutils.RWMutex - registeredProtocolsMutex syncutils.RWMutexFake + registeredProtocolsMutex syncutils.RWMutex registeredProtocols map[protocol.ID]*ProtocolHandler } diff --git a/packages/network/p2p/stream.go b/packages/network/p2p/stream.go index ddd5c43734..8eab332a03 100644 --- a/packages/network/p2p/stream.go +++ b/packages/network/p2p/stream.go @@ -221,7 +221,7 @@ func (m *Manager) handleStream(stream network.Stream) { type AcceptMatcher struct { Peer *peer.Peer // connecting peer Libp2pID libp2ppeer.ID - StreamChMutex syncutils.RWMutexFake + StreamChMutex syncutils.RWMutex StreamCh map[protocol.ID]chan *PacketsStream Ctx context.Context CtxCancel context.CancelFunc @@ -299,9 +299,9 @@ type PacketsStream struct { network.Stream packetFactory func() proto.Message - readerLock sync.Mutex + readerLock syncutils.Mutex reader *libp2putil.UvarintReader - writerLock sync.Mutex + writerLock syncutils.Mutex writer *libp2putil.UvarintWriter packetsRead *atomic.Uint64 packetsWritten *atomic.Uint64 diff --git a/packages/network/protocol.go b/packages/network/protocol.go index 38bc10f615..74f5fac25e 100644 --- a/packages/network/protocol.go +++ b/packages/network/protocol.go @@ -1,8 +1,6 @@ package network import ( - "sync" - "github.com/pkg/errors" "google.golang.org/protobuf/proto" @@ -19,6 +17,7 @@ import ( "github.com/iotaledger/hive.go/ds/types" "github.com/iotaledger/hive.go/lo" "github.com/iotaledger/hive.go/runtime/options" + "github.com/iotaledger/hive.go/runtime/syncutils" "github.com/iotaledger/hive.go/runtime/workerpool" ) @@ -36,7 +35,7 @@ type Protocol struct { duplicateBlockBytesFilter *bytesfilter.BytesFilter requestedBlockHashes *shrinkingmap.ShrinkingMap[types.Identifier, types.Empty] - requestedBlockHashesMutex sync.Mutex + requestedBlockHashesMutex syncutils.Mutex } func NewProtocol(network Endpoint, workerPool *workerpool.WorkerPool, slotTimeProvider *slot.TimeProvider, opts ...options.Option[Protocol]) (protocol *Protocol) { diff --git a/packages/network/testframework.go b/packages/network/testframework.go index 302ca1e57d..e22c8500cd 100644 --- a/packages/network/testframework.go +++ b/packages/network/testframework.go @@ -16,7 +16,7 @@ const mainPartition = "main" type MockedNetwork struct { dispatchersByPartition map[string]map[identity.ID]*MockedEndpoint - dispatchersMutex syncutils.RWMutexFake + dispatchersMutex syncutils.RWMutex } func NewMockedNetwork() (mockedNetwork *MockedNetwork) { @@ -83,7 +83,7 @@ type MockedEndpoint struct { network *MockedNetwork partition string handlers map[string]func(identity.ID, proto.Message) error - handlersMutex syncutils.RWMutexFake + handlersMutex syncutils.RWMutex } func NewMockedEndpoint(id identity.ID, network *MockedNetwork, partition string) (newMockedNetwork *MockedEndpoint) { diff --git a/packages/protocol/chainmanager/chain.go b/packages/protocol/chainmanager/chain.go index eec16f32da..28ae42bb8d 100644 --- a/packages/protocol/chainmanager/chain.go +++ b/packages/protocol/chainmanager/chain.go @@ -11,7 +11,7 @@ type Chain struct { latestCommitmentIndex slot.Index commitmentsByIndex map[slot.Index]*Commitment - syncutils.RWMutexFake + syncutils.RWMutex } func NewChain(forkingPoint *Commitment) (fork *Chain) { diff --git a/packages/protocol/chainmanager/manager.go b/packages/protocol/chainmanager/manager.go index 79453a832a..d2ae8e29d8 100644 --- a/packages/protocol/chainmanager/manager.go +++ b/packages/protocol/chainmanager/manager.go @@ -32,7 +32,7 @@ type Manager struct { forkingPointsByCommitments *memstorage.SlotStorage[commitment.ID, commitment.ID] forksByForkingPoint *shrinkingmap.ShrinkingMap[commitment.ID, *Fork] - evictionMutex syncutils.RWMutexFake + evictionMutex syncutils.RWMutex optsCommitmentRequester []options.Option[eventticker.EventTicker[commitment.ID]] diff --git a/packages/protocol/chainmanager/testframework.go b/packages/protocol/chainmanager/testframework.go index 435367a826..c2a71855af 100644 --- a/packages/protocol/chainmanager/testframework.go +++ b/packages/protocol/chainmanager/testframework.go @@ -27,7 +27,7 @@ type TestFramework struct { missingCommitmentReceived int32 commitmentBelowRoot int32 - syncutils.RWMutexFake + syncutils.RWMutex } func NewTestFramework(test *testing.T, opts ...options.Option[TestFramework]) (testFramework *TestFramework) { diff --git a/packages/protocol/congestioncontrol/congestioncontrol.go b/packages/protocol/congestioncontrol/congestioncontrol.go index 7d312efb6c..b427658af9 100644 --- a/packages/protocol/congestioncontrol/congestioncontrol.go +++ b/packages/protocol/congestioncontrol/congestioncontrol.go @@ -13,7 +13,7 @@ type CongestionControl struct { Events *Events scheduler *scheduler.Scheduler - schedulerMutex syncutils.RWMutexFake + schedulerMutex syncutils.RWMutex optsSchedulerOptions []options.Option[scheduler.Scheduler] } diff --git a/packages/protocol/congestioncontrol/icca/scheduler/scheduler.go b/packages/protocol/congestioncontrol/icca/scheduler/scheduler.go index 08e21623d5..821f8f5272 100644 --- a/packages/protocol/congestioncontrol/icca/scheduler/scheduler.go +++ b/packages/protocol/congestioncontrol/icca/scheduler/scheduler.go @@ -40,12 +40,12 @@ type Scheduler struct { slotTimeProvider *slot.TimeProvider blocks *memstorage.SlotStorage[models.BlockID, *Block] - bufferMutex syncutils.RWMutexFake + bufferMutex syncutils.RWMutex buffer *BufferQueue - deficitsMutex syncutils.RWMutexFake + deficitsMutex syncutils.RWMutex deficits *shrinkingmap.ShrinkingMap[identity.ID, *big.Rat] evictionState *eviction.State - evictionMutex syncutils.RWMutexFake + evictionMutex syncutils.RWMutex totalAccessManaRetrieveFunc func() int64 accessManaMapRetrieverFunc func() map[identity.ID]int64 diff --git a/packages/protocol/engine/clock/blocktime/relativetime.go b/packages/protocol/engine/clock/blocktime/relativetime.go index 13746f9025..162d137127 100644 --- a/packages/protocol/engine/clock/blocktime/relativetime.go +++ b/packages/protocol/engine/clock/blocktime/relativetime.go @@ -19,7 +19,7 @@ type RelativeTime struct { timeUpdateOffset time.Time // mutex is used to synchronize access to the time value. - mutex syncutils.RWMutexFake + mutex syncutils.RWMutex } // NewRelativeTime creates a new RelativeTime. diff --git a/packages/protocol/engine/consensus/blockgadget/testframework.go b/packages/protocol/engine/consensus/blockgadget/testframework.go index 613901c008..633f6529b0 100644 --- a/packages/protocol/engine/consensus/blockgadget/testframework.go +++ b/packages/protocol/engine/consensus/blockgadget/testframework.go @@ -142,7 +142,7 @@ type MockBlockGadget struct { AcceptedBlocks models.BlockIDs AcceptedMarkers *markers.Markers - mutex syncutils.RWMutexFake + mutex syncutils.RWMutex module.Module } diff --git a/packages/protocol/engine/consensus/blockgadget/tresholdblockgadget/gadget.go b/packages/protocol/engine/consensus/blockgadget/tresholdblockgadget/gadget.go index 8fa8004728..8fecebdc1f 100644 --- a/packages/protocol/engine/consensus/blockgadget/tresholdblockgadget/gadget.go +++ b/packages/protocol/engine/consensus/blockgadget/tresholdblockgadget/gadget.go @@ -1,8 +1,6 @@ package tresholdblockgadget import ( - "sync" - "github.com/pkg/errors" "github.com/iotaledger/goshimmer/packages/core/votes/conflicttracker" @@ -41,7 +39,7 @@ type Gadget struct { blocks *memstorage.SlotStorage[models.BlockID, *blockgadget.Block] evictionState *eviction.State - evictionMutex syncutils.RWMutexFake + evictionMutex syncutils.RWMutex slotTimeProvider *slot.TimeProvider workers *workerpool.Group @@ -49,11 +47,11 @@ type Gadget struct { totalWeightCallback func() int64 lastAcceptedMarker *shrinkingmap.ShrinkingMap[markers.SequenceID, markers.Index] - lastAcceptedMarkerMutex sync.Mutex + lastAcceptedMarkerMutex syncutils.Mutex optsMarkerAcceptanceThreshold float64 acceptanceOrder *causalordersync.CausalOrder[models.BlockID, *blockgadget.Block] lastConfirmedMarker *shrinkingmap.ShrinkingMap[markers.SequenceID, markers.Index] - lastConfirmedMarkerMutex sync.Mutex + lastConfirmedMarkerMutex syncutils.Mutex optsMarkerConfirmationThreshold float64 confirmationOrder *causalordersync.CausalOrder[models.BlockID, *blockgadget.Block] diff --git a/packages/protocol/engine/consensus/slotgadget/totalweightslotgadget/gadget.go b/packages/protocol/engine/consensus/slotgadget/totalweightslotgadget/gadget.go index 2898c8f30d..c5bc2032ec 100644 --- a/packages/protocol/engine/consensus/slotgadget/totalweightslotgadget/gadget.go +++ b/packages/protocol/engine/consensus/slotgadget/totalweightslotgadget/gadget.go @@ -21,7 +21,7 @@ type Gadget struct { lastConfirmedSlot slot.Index totalWeightCallback func() int64 - mutex syncutils.RWMutexFake + mutex syncutils.RWMutex optsSlotConfirmationThreshold float64 diff --git a/packages/protocol/engine/engine.go b/packages/protocol/engine/engine.go index aeae7b418e..5928f79d11 100644 --- a/packages/protocol/engine/engine.go +++ b/packages/protocol/engine/engine.go @@ -4,7 +4,6 @@ import ( "io" "os" "path/filepath" - "sync" "time" "github.com/pkg/errors" @@ -31,6 +30,7 @@ import ( "github.com/iotaledger/hive.go/runtime/event" "github.com/iotaledger/hive.go/runtime/module" "github.com/iotaledger/hive.go/runtime/options" + "github.com/iotaledger/hive.go/runtime/syncutils" "github.com/iotaledger/hive.go/runtime/workerpool" ) @@ -54,7 +54,7 @@ type Engine struct { Workers *workerpool.Group isBootstrapped bool - isBootstrappedMutex sync.Mutex + isBootstrappedMutex syncutils.Mutex optsBootstrappedThreshold time.Duration optsEntryPointsDepth int @@ -62,7 +62,7 @@ type Engine struct { optsTSCManagerOptions []options.Option[tsc.Manager] optsBlockRequester []options.Option[eventticker.EventTicker[models.BlockID]] - ProcessingMutex sync.Mutex + ProcessingMutex syncutils.Mutex module.Module } diff --git a/packages/protocol/engine/eviction/state.go b/packages/protocol/engine/eviction/state.go index 07fcf20f9e..e2025ed92f 100644 --- a/packages/protocol/engine/eviction/state.go +++ b/packages/protocol/engine/eviction/state.go @@ -3,7 +3,6 @@ package eviction import ( "io" "math" - "sync" "github.com/pkg/errors" @@ -27,8 +26,8 @@ type State struct { latestRootBlocks *ringbuffer.RingBuffer[models.BlockID] storage *storage.Storage lastEvictedSlot slot.Index - evictionMutex syncutils.RWMutexFake - triggerMutex sync.Mutex + evictionMutex syncutils.RWMutex + triggerMutex syncutils.Mutex optsRootBlocksEvictionDelay slot.Index } diff --git a/packages/protocol/engine/ledger/mempool/conflictdag/conflictdag.go b/packages/protocol/engine/ledger/mempool/conflictdag/conflictdag.go index 8a079cb596..82cccbe3c2 100644 --- a/packages/protocol/engine/ledger/mempool/conflictdag/conflictdag.go +++ b/packages/protocol/engine/ledger/mempool/conflictdag/conflictdag.go @@ -28,7 +28,7 @@ type ConflictDAG[ConflictIDType, ResourceIDType comparable] struct { // It is used by different components, but it is placed here because it's easily accessible in all needed components. // It serves more as a quick-fix, as eventually conflict tracking spread across multiple components // (ConflictDAG, ConflictResolver, ConflictsTracker) will be refactored into a single component that handles locking nicely. - WeightsMutex syncutils.RWMutexFake + WeightsMutex syncutils.RWMutex optsMergeToMaster bool } diff --git a/packages/protocol/engine/ledger/mempool/conflictdag/models.go b/packages/protocol/engine/ledger/mempool/conflictdag/models.go index b58207f8bc..1f00901e1d 100644 --- a/packages/protocol/engine/ledger/mempool/conflictdag/models.go +++ b/packages/protocol/engine/ledger/mempool/conflictdag/models.go @@ -18,7 +18,7 @@ type Conflict[ConflictIDType, ResourceIDType comparable] struct { confirmationState confirmation.State - m syncutils.RWMutexFake + m syncutils.RWMutex } func NewConflict[ConflictIDType comparable, ResourceIDType comparable](id ConflictIDType, parents *advancedset.AdvancedSet[ConflictIDType], conflictSets *advancedset.AdvancedSet[*ConflictSet[ConflictIDType, ResourceIDType]], confirmationState confirmation.State) (c *Conflict[ConflictIDType, ResourceIDType]) { @@ -143,7 +143,7 @@ type ConflictSet[ConflictIDType, ResourceIDType comparable] struct { id ResourceIDType conflicts *advancedset.AdvancedSet[*Conflict[ConflictIDType, ResourceIDType]] - m syncutils.RWMutexFake + m syncutils.RWMutex } func NewConflictSet[ConflictIDType comparable, ResourceIDType comparable](id ResourceIDType) (c *ConflictSet[ConflictIDType, ResourceIDType]) { diff --git a/packages/protocol/engine/ledger/mempool/testframework.go b/packages/protocol/engine/ledger/mempool/testframework.go index 4d6d07426b..ee1492782b 100644 --- a/packages/protocol/engine/ledger/mempool/testframework.go +++ b/packages/protocol/engine/ledger/mempool/testframework.go @@ -36,7 +36,7 @@ type TestFramework struct { transactionsByAlias map[string]*mockedvm.MockedTransaction // transactionsByAliasMutex contains a mutex that is used to synchronize parallel access to the transactionsByAlias. - transactionsByAliasMutex syncutils.RWMutexFake + transactionsByAliasMutex syncutils.RWMutex // outputIDsByAlias contains a dictionary that maps a human-readable alias to an OutputID. outputIDsByAlias map[string]utxo.OutputID diff --git a/packages/protocol/engine/ledger/utxo/types.go b/packages/protocol/engine/ledger/utxo/types.go index 5ce8caf88b..a132bc0c3b 100644 --- a/packages/protocol/engine/ledger/utxo/types.go +++ b/packages/protocol/engine/ledger/utxo/types.go @@ -186,7 +186,7 @@ var ( _outputIDAliases = make(map[OutputID]string) // _outputIDAliasesMutex is the mutex that is used to synchronize access to the previous map. - _outputIDAliasesMutex = syncutils.RWMutexFake{} + _outputIDAliasesMutex = syncutils.RWMutex{} ) // endregion /////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/packages/protocol/engine/ledger/utxoledger/unspentoutputs.go b/packages/protocol/engine/ledger/utxoledger/unspentoutputs.go index 7fb34608fb..a6249ca8ff 100644 --- a/packages/protocol/engine/ledger/utxoledger/unspentoutputs.go +++ b/packages/protocol/engine/ledger/utxoledger/unspentoutputs.go @@ -27,7 +27,7 @@ type UnspentOutputs struct { memPool mempool.MemPool consumers map[ledger.UnspentOutputsSubscriber]types.Empty - consumersMutex syncutils.RWMutexFake + consumersMutex syncutils.RWMutex batchConsumers map[ledger.UnspentOutputsSubscriber]types.Empty batchCreatedOutputIDs utxo.OutputIDs batchSpentOutputIDs utxo.OutputIDs diff --git a/packages/protocol/engine/ledger/utxoledger/utxoledger.go b/packages/protocol/engine/ledger/utxoledger/utxoledger.go index a8debc08b6..412d03da22 100644 --- a/packages/protocol/engine/ledger/utxoledger/utxoledger.go +++ b/packages/protocol/engine/ledger/utxoledger/utxoledger.go @@ -23,7 +23,7 @@ type UTXOLedger struct { memPool mempool.MemPool unspentOutputs *UnspentOutputs stateDiffs *StateDiffs - mutex syncutils.RWMutexFake + mutex syncutils.RWMutex optsMemPoolProvider module.Provider[*engine.Engine, mempool.MemPool] diff --git a/packages/protocol/engine/ledger/vm/devnetvm/output.go b/packages/protocol/engine/ledger/vm/devnetvm/output.go index 8e74ee870b..b848dfe9a6 100644 --- a/packages/protocol/engine/ledger/vm/devnetvm/output.go +++ b/packages/protocol/engine/ledger/vm/devnetvm/output.go @@ -598,7 +598,7 @@ const ( type AliasOutput struct { // common for all outputs outputID utxo.OutputID - outputIDMutex syncutils.RWMutexFake + outputIDMutex syncutils.RWMutex balances *ColoredBalances // aliasAddress becomes immutable after created for a lifetime. It is returned as Address() @@ -632,7 +632,7 @@ type AliasOutput struct { // governance transition delegationTimelock time.Time - mutex syncutils.RWMutexFake + mutex syncutils.RWMutex objectstorage.StorableObjectFlags } @@ -1581,7 +1581,7 @@ var _ Output = new(AliasOutput) // - data payload for arbitrary metadata (size limits apply). type ExtendedLockedOutput struct { id utxo.OutputID - idMutex syncutils.RWMutexFake + idMutex syncutils.RWMutex balances *ColoredBalances address Address // any address type diff --git a/packages/protocol/engine/ledger/vm/devnetvm/output_test.go b/packages/protocol/engine/ledger/vm/devnetvm/output_test.go index a720cc64bb..e207b35b2a 100644 --- a/packages/protocol/engine/ledger/vm/devnetvm/output_test.go +++ b/packages/protocol/engine/ledger/vm/devnetvm/output_test.go @@ -1294,7 +1294,7 @@ func TestAliasOutput_unlockedGovernanceByAliasIndex(t *testing.T) { governingAlias := &AliasOutput{ outputID: randOutputID(), - outputIDMutex: syncutils.RWMutexFake{}, + outputIDMutex: syncutils.RWMutex{}, balances: NewColoredBalances(map[Color]uint64{ColorIOTA: DustThresholdAliasOutputIOTA}), aliasAddress: *randAliasAddress(), stateAddress: governingAliasStateAddress, @@ -1309,7 +1309,7 @@ func TestAliasOutput_unlockedGovernanceByAliasIndex(t *testing.T) { aliasStateAddress := NewED25519Address(aliasStateKeyPair.PublicKey) alias := &AliasOutput{ outputID: randOutputID(), - outputIDMutex: syncutils.RWMutexFake{}, + outputIDMutex: syncutils.RWMutex{}, balances: NewColoredBalances(map[Color]uint64{ColorIOTA: DustThresholdAliasOutputIOTA}), aliasAddress: *randAliasAddress(), stateAddress: aliasStateAddress, @@ -1409,7 +1409,7 @@ func TestAliasOutput_UnlockValid(t *testing.T) { governingWallet := genRandomWallet() alias := &AliasOutput{ outputID: randOutputID(), - outputIDMutex: syncutils.RWMutexFake{}, + outputIDMutex: syncutils.RWMutex{}, balances: NewColoredBalances(map[Color]uint64{ColorIOTA: DustThresholdAliasOutputIOTA}), aliasAddress: *randAliasAddress(), stateAddress: w.address, @@ -1561,7 +1561,7 @@ func TestAliasOutput_UnlockValid(t *testing.T) { governingAliasStateWallet := genRandomWallet() governingAlias := &AliasOutput{ outputID: randOutputID(), - outputIDMutex: syncutils.RWMutexFake{}, + outputIDMutex: syncutils.RWMutex{}, balances: NewColoredBalances(map[Color]uint64{ColorIOTA: DustThresholdAliasOutputIOTA}), aliasAddress: *randAliasAddress(), stateAddress: governingAliasStateWallet.address, @@ -1574,7 +1574,7 @@ func TestAliasOutput_UnlockValid(t *testing.T) { aliasStateWallet := genRandomWallet() governedAlias := &AliasOutput{ outputID: randOutputID(), - outputIDMutex: syncutils.RWMutexFake{}, + outputIDMutex: syncutils.RWMutex{}, balances: NewColoredBalances(map[Color]uint64{ColorIOTA: DustThresholdAliasOutputIOTA}), aliasAddress: *randAliasAddress(), stateAddress: aliasStateWallet.address, @@ -2130,7 +2130,7 @@ func TestExtendedLockedOutput_UnlockValid(t *testing.T) { w := genRandomWallet() alias := &AliasOutput{ outputID: randOutputID(), - outputIDMutex: syncutils.RWMutexFake{}, + outputIDMutex: syncutils.RWMutex{}, balances: NewColoredBalances(map[Color]uint64{ColorIOTA: DustThresholdAliasOutputIOTA}), aliasAddress: *randAliasAddress(), stateAddress: w.address, // alias state controller is our wallet @@ -2199,7 +2199,7 @@ func TestExtendedLockedOutput_UnlockValid(t *testing.T) { t.Run("CASE: Referenced wrong alias", func(t *testing.T) { alias := &AliasOutput{ outputID: randOutputID(), - outputIDMutex: syncutils.RWMutexFake{}, + outputIDMutex: syncutils.RWMutex{}, balances: NewColoredBalances(map[Color]uint64{ColorIOTA: DustThresholdAliasOutputIOTA}), aliasAddress: *randAliasAddress(), stateAddress: randEd25119Address(), // alias state controller is our wallet @@ -2339,7 +2339,7 @@ func dummyAliasOutput(origin ...bool) *AliasOutput { } return &AliasOutput{ outputID: randOutputID(), - outputIDMutex: syncutils.RWMutexFake{}, + outputIDMutex: syncutils.RWMutex{}, balances: NewColoredBalances(map[Color]uint64{ColorIOTA: DustThresholdAliasOutputIOTA}), aliasAddress: *randAliasAddress(), stateAddress: randEd25119Address(), @@ -2358,7 +2358,7 @@ func dummyAliasOutput(origin ...bool) *AliasOutput { func dummyExtendedLockedOutput() *ExtendedLockedOutput { return &ExtendedLockedOutput{ id: randOutputID(), - idMutex: syncutils.RWMutexFake{}, + idMutex: syncutils.RWMutex{}, balances: NewColoredBalances(map[Color]uint64{ColorIOTA: 1}), address: randEd25119Address(), fallbackAddress: randEd25119Address(), diff --git a/packages/protocol/engine/notarization/slotnotarization/manager.go b/packages/protocol/engine/notarization/slotnotarization/manager.go index e60d8573a5..f76e521c6a 100644 --- a/packages/protocol/engine/notarization/slotnotarization/manager.go +++ b/packages/protocol/engine/notarization/slotnotarization/manager.go @@ -36,7 +36,7 @@ type Manager struct { storage *storage.Storage ledgerState ledger.Ledger - commitmentMutex syncutils.RWMutexFake + commitmentMutex syncutils.RWMutex acceptedTimeFunc func() time.Time diff --git a/packages/protocol/engine/notarization/slotnotarization/slotmutations.go b/packages/protocol/engine/notarization/slotnotarization/slotmutations.go index 3e58bad7e8..7b164168b5 100644 --- a/packages/protocol/engine/notarization/slotnotarization/slotmutations.go +++ b/packages/protocol/engine/notarization/slotnotarization/slotmutations.go @@ -32,7 +32,7 @@ type SlotMutations struct { // latestCommittedIndex stores the index of the latest committed slot. latestCommittedIndex slot.Index - evictionMutex syncutils.RWMutexFake + evictionMutex syncutils.RWMutex // lastCommittedSlotCumulativeWeight stores the cumulative weight of the last committed slot lastCommittedSlotCumulativeWeight uint64 diff --git a/packages/protocol/engine/notarization/slotnotarization/testframework.go b/packages/protocol/engine/notarization/slotnotarization/testframework.go index 895eb3816d..81576eb0d6 100644 --- a/packages/protocol/engine/notarization/slotnotarization/testframework.go +++ b/packages/protocol/engine/notarization/slotnotarization/testframework.go @@ -29,7 +29,7 @@ type TestFramework struct { blocksByID map[string]*models.Block slotEntityCounter map[slot.Index]int - syncutils.RWMutexFake + syncutils.RWMutex } func NewTestFramework(test *testing.T, slotTimeProvider *slot.TimeProvider) *TestFramework { diff --git a/packages/protocol/engine/sybilprotection/weightedset.go b/packages/protocol/engine/sybilprotection/weightedset.go index e49c098d71..1f41e82030 100644 --- a/packages/protocol/engine/sybilprotection/weightedset.go +++ b/packages/protocol/engine/sybilprotection/weightedset.go @@ -11,9 +11,9 @@ type WeightedSet struct { Weights *Weights weightUpdatesDetach *event.Hook[func(*WeightsBatch)] members *advancedset.AdvancedSet[identity.ID] - membersMutex syncutils.RWMutexFake + membersMutex syncutils.RWMutex totalWeight int64 - totalWeightMutex syncutils.RWMutexFake + totalWeightMutex syncutils.RWMutex } func NewWeightedSet(weights *Weights, optMembers ...identity.ID) (newWeightedSet *WeightedSet) { diff --git a/packages/protocol/engine/sybilprotection/weights.go b/packages/protocol/engine/sybilprotection/weights.go index d53c09a973..c7558a7d36 100644 --- a/packages/protocol/engine/sybilprotection/weights.go +++ b/packages/protocol/engine/sybilprotection/weights.go @@ -1,8 +1,6 @@ package sybilprotection import ( - "sync" - "github.com/pkg/errors" "github.com/zyedidia/generic/cache" @@ -25,9 +23,9 @@ type Weights struct { weights *ads.Map[identity.ID, Weight, *identity.ID, *Weight] weightsCache *cache.Cache[identity.ID, *Weight] - cacheMutex sync.Mutex + cacheMutex syncutils.Mutex totalWeight *Weight - mutex syncutils.RWMutexFake + mutex syncutils.RWMutex } // NewWeights creates a new Weights instance. diff --git a/packages/protocol/engine/tangle/blockdag/block.go b/packages/protocol/engine/tangle/blockdag/block.go index 6d56ed0305..5095d9ad40 100644 --- a/packages/protocol/engine/tangle/blockdag/block.go +++ b/packages/protocol/engine/tangle/blockdag/block.go @@ -25,7 +25,7 @@ type Block struct { strongChildren []*Block weakChildren []*Block likedInsteadChildren []*Block - mutex syncutils.RWMutexFake + mutex syncutils.RWMutex *ModelsBlock } diff --git a/packages/protocol/engine/tangle/blockdag/inmemoryblockdag/blockdag.go b/packages/protocol/engine/tangle/blockdag/inmemoryblockdag/blockdag.go index ac2fb6aa76..f2b8f86d34 100644 --- a/packages/protocol/engine/tangle/blockdag/inmemoryblockdag/blockdag.go +++ b/packages/protocol/engine/tangle/blockdag/inmemoryblockdag/blockdag.go @@ -55,10 +55,10 @@ type BlockDAG struct { // deadlock can occur only when an eviction is triggered while the above scenario unfolds. solidifierMutex sync.RWMutex - futureBlocksMutex syncutils.RWMutexFake + futureBlocksMutex syncutils.RWMutex // evictionMutex is a mutex that is used to synchronize the eviction of elements from the BlockDAG. - evictionMutex syncutils.RWMutexFake + evictionMutex syncutils.RWMutex slotTimeProviderFunc func() *slot.TimeProvider diff --git a/packages/protocol/engine/tangle/blockdag/inmemoryblockdag/blockdag_test.go b/packages/protocol/engine/tangle/blockdag/inmemoryblockdag/blockdag_test.go index 6ddf177144..87e13b1d53 100644 --- a/packages/protocol/engine/tangle/blockdag/inmemoryblockdag/blockdag_test.go +++ b/packages/protocol/engine/tangle/blockdag/inmemoryblockdag/blockdag_test.go @@ -271,7 +271,7 @@ func TestBlockDAG_AttachBlockTwice_1(t *testing.T) { err1 error err2 error started uint8 - startMutex syncutils.RWMutexFake + startMutex syncutils.RWMutex ) loop := workers.CreatePool("Loop", 2) diff --git a/packages/protocol/engine/tangle/blockdag/testframework.go b/packages/protocol/engine/tangle/blockdag/testframework.go index fd703dbf44..c0ac5f8c26 100644 --- a/packages/protocol/engine/tangle/blockdag/testframework.go +++ b/packages/protocol/engine/tangle/blockdag/testframework.go @@ -1,7 +1,6 @@ package blockdag import ( - "sync" "sync/atomic" "testing" @@ -17,6 +16,7 @@ import ( "github.com/iotaledger/hive.go/lo" "github.com/iotaledger/hive.go/runtime/debug" "github.com/iotaledger/hive.go/runtime/options" + "github.com/iotaledger/hive.go/runtime/syncutils" "github.com/iotaledger/hive.go/runtime/workerpool" ) @@ -34,7 +34,7 @@ type TestFramework struct { invalidBlocks int32 attachedBlocks int32 orphanedBlocks models.BlockIDs - orphanedBlocksMutex sync.Mutex + orphanedBlocksMutex syncutils.Mutex slotTimeProviderFunc func() *slot.TimeProvider diff --git a/packages/protocol/engine/tangle/booker/markerbooker/booker.go b/packages/protocol/engine/tangle/booker/markerbooker/booker.go index d5ced6ce22..03558c4b45 100644 --- a/packages/protocol/engine/tangle/booker/markerbooker/booker.go +++ b/packages/protocol/engine/tangle/booker/markerbooker/booker.go @@ -53,7 +53,7 @@ type Booker struct { markerManager *markermanager.MarkerManager[models.BlockID, *booker.Block] bookingMutex *syncutils.DAGMutex[models.BlockID] sequenceMutex *syncutils.DAGMutex[markers.SequenceID] - evictionMutex syncutils.RWMutexFake + evictionMutex syncutils.RWMutex sequenceEvictionMutex *syncutils.StarvingMutex optsMarkerManager []options.Option[markermanager.MarkerManager[models.BlockID, *booker.Block]] diff --git a/packages/protocol/engine/tangle/booker/markerbooker/markermanager/markerindexconflictmap.go b/packages/protocol/engine/tangle/booker/markerbooker/markermanager/markerindexconflictmap.go index a1c6a30144..e5bf7751b8 100644 --- a/packages/protocol/engine/tangle/booker/markerbooker/markermanager/markerindexconflictmap.go +++ b/packages/protocol/engine/tangle/booker/markerbooker/markermanager/markerindexconflictmap.go @@ -11,7 +11,7 @@ import ( type MarkerIndexConflictIDMapping struct { t *thresholdmap.ThresholdMap[markers.Index, utxo.TransactionIDs] - syncutils.RWMutexFake + syncutils.RWMutex } // NewMarkerIndexConflictIDMapping creates a new MarkerIndexConflictIDMapping. diff --git a/packages/protocol/engine/throughputquota/mana1/throughputquota.go b/packages/protocol/engine/throughputquota/mana1/throughputquota.go index 25fcb82fa2..d5ff237ef3 100644 --- a/packages/protocol/engine/throughputquota/mana1/throughputquota.go +++ b/packages/protocol/engine/throughputquota/mana1/throughputquota.go @@ -32,10 +32,10 @@ type ThroughputQuota struct { //workers *workerpool.Group quotaByIDStorage *kvstore.TypedStore[identity.ID, storable.SerializableInt64, *identity.ID, *storable.SerializableInt64] quotaByIDCache *shrinkingmap.ShrinkingMap[identity.ID, int64] - quotaByIDMutex syncutils.RWMutexFake // TODO: replace this lock with DAG mutex so each entity is individually locked + quotaByIDMutex syncutils.RWMutex // TODO: replace this lock with DAG mutex so each entity is individually locked totalBalanceStorage kvstore.KVStore totalBalance int64 - totalBalanceMutex syncutils.RWMutexFake + totalBalanceMutex syncutils.RWMutex traits.BatchCommittable module.Module diff --git a/packages/protocol/engine/tsc/manager.go b/packages/protocol/engine/tsc/manager.go index e12d8a90d7..f09780576d 100644 --- a/packages/protocol/engine/tsc/manager.go +++ b/packages/protocol/engine/tsc/manager.go @@ -2,7 +2,6 @@ package tsc import ( "container/heap" - "sync" "time" "github.com/iotaledger/goshimmer/packages/protocol/engine/tangle" @@ -11,6 +10,7 @@ import ( "github.com/iotaledger/goshimmer/packages/protocol/models" "github.com/iotaledger/hive.go/ds/generalheap" "github.com/iotaledger/hive.go/runtime/options" + "github.com/iotaledger/hive.go/runtime/syncutils" "github.com/iotaledger/hive.go/runtime/timed" ) @@ -24,7 +24,7 @@ type Manager struct { optsTimeSinceConfirmationThreshold time.Duration - sync.Mutex + syncutils.Mutex } // New returns a new instance of Manager. diff --git a/packages/protocol/markers/marker.go b/packages/protocol/markers/marker.go index c6768c4311..597f216e49 100644 --- a/packages/protocol/markers/marker.go +++ b/packages/protocol/markers/marker.go @@ -61,7 +61,7 @@ type Markers struct { markers map[SequenceID]Index highestIndex Index lowestIndex Index - mutex syncutils.RWMutexFake + mutex syncutils.RWMutex } // NewMarkers creates a new collection of Markers. @@ -295,7 +295,7 @@ func (m *Markers) String() string { // reference a given Marker in a Sequence. type ReferencingMarkers struct { referencingIndexesBySequence map[SequenceID]*thresholdmap.ThresholdMap[uint64, Index] `serix:"0,lengthPrefixType=uint32"` - syncutils.RWMutexFake + syncutils.RWMutex } // NewReferencingMarkers is the constructor for the ReferencingMarkers. @@ -412,7 +412,7 @@ func (r *ReferencingMarkers) String() (humanReadableReferencingMarkers string) { // of its parent Sequences in the Sequence DAG. type ReferencedMarkers struct { referencedIndexesBySequence map[SequenceID]*thresholdmap.ThresholdMap[uint64, Index] `serix:"0,lengthPrefixType=uint32"` - syncutils.RWMutexFake + syncutils.RWMutex } // NewReferencedMarkers is the constructor for the ReferencedMarkers. diff --git a/packages/protocol/markers/sequence.go b/packages/protocol/markers/sequence.go index 8d9918f34d..4ef2b159b2 100644 --- a/packages/protocol/markers/sequence.go +++ b/packages/protocol/markers/sequence.go @@ -69,7 +69,7 @@ type Sequence struct { lowestIndex Index highestIndex Index - syncutils.RWMutexFake + syncutils.RWMutex } // NewSequence creates a new Sequence from the given details. diff --git a/packages/protocol/markers/sequencemanager.go b/packages/protocol/markers/sequencemanager.go index 15ab74bf96..638439e7e1 100644 --- a/packages/protocol/markers/sequencemanager.go +++ b/packages/protocol/markers/sequencemanager.go @@ -3,11 +3,11 @@ package markers import ( "fmt" "math" - "sync" "github.com/iotaledger/hive.go/ds/shrinkingmap" "github.com/iotaledger/hive.go/ds/walker" "github.com/iotaledger/hive.go/runtime/options" + "github.com/iotaledger/hive.go/runtime/syncutils" ) // region SequenceManager ////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -17,7 +17,7 @@ import ( type SequenceManager struct { sequences *shrinkingmap.ShrinkingMap[SequenceID, *Sequence] sequenceIDCounter SequenceID - sequenceIDCounterMutex sync.Mutex + sequenceIDCounterMutex syncutils.Mutex // optsMaxPastMarkerDistance is a parameter for the SequenceManager that allows to specify how many consecutive blocks are // allowed to not receive a new PastMaster before we create a new Sequence. diff --git a/packages/protocol/markers/structuredetails.go b/packages/protocol/markers/structuredetails.go index 6d1ead0cea..183fe6cee6 100644 --- a/packages/protocol/markers/structuredetails.go +++ b/packages/protocol/markers/structuredetails.go @@ -16,7 +16,7 @@ type StructureDetails struct { isPastMarker bool pastMarkers *Markers - syncutils.RWMutexFake + syncutils.RWMutex } // NewStructureDetails creates an empty StructureDetails object. diff --git a/packages/protocol/mockednetwork/node.go b/packages/protocol/mockednetwork/node.go index aa5f014c26..24d8b2e490 100644 --- a/packages/protocol/mockednetwork/node.go +++ b/packages/protocol/mockednetwork/node.go @@ -47,7 +47,7 @@ type Node struct { Protocol *protocol.Protocol tf *engine.TestFramework - mutex syncutils.RWMutexFake + mutex syncutils.RWMutex } func NewNode(t *testing.T, keyPair ed25519.KeyPair, network *network.MockedNetwork, partition string, snapshotPath string, ledgerProvider module.Provider[*engine.Engine, ledger.Ledger]) *Node { diff --git a/packages/protocol/models/blockid.go b/packages/protocol/models/blockid.go index 4ac5427f2f..2aa29debd0 100644 --- a/packages/protocol/models/blockid.go +++ b/packages/protocol/models/blockid.go @@ -176,7 +176,7 @@ var ( _BlockIDAliases = make(map[BlockID]string) // _BlockIDAliasesMutex is the mutex that is used to synchronize access to the previous map. - _BlockIDAliasesMutex = syncutils.RWMutexFake{} + _BlockIDAliasesMutex = syncutils.RWMutex{} ) // endregion /////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/packages/protocol/models/payload/type.go b/packages/protocol/models/payload/type.go index 2dc5e5cf44..c980f51283 100644 --- a/packages/protocol/models/payload/type.go +++ b/packages/protocol/models/payload/type.go @@ -15,7 +15,7 @@ var ( typeRegister = make(map[Type]string) // typeRegisterMutex is used to make synchronize the access to the previously defined map. - typeRegisterMutex syncutils.RWMutexFake + typeRegisterMutex syncutils.RWMutex ) // NewType creates and registers a new payload Type. diff --git a/packages/protocol/protocol.go b/packages/protocol/protocol.go index 60564c467d..e435323ae1 100644 --- a/packages/protocol/protocol.go +++ b/packages/protocol/protocol.go @@ -60,7 +60,7 @@ type Protocol struct { dispatcher network.Endpoint networkProtocol *network.Protocol - activeEngineMutex syncutils.RWMutexFake + activeEngineMutex syncutils.RWMutex mainEngine *engine.Engine candidateEngine *engine.Engine diff --git a/packages/protocol/requester/warpsync/manager.go b/packages/protocol/requester/warpsync/manager.go index 89be80da8c..5e8a608b6c 100644 --- a/packages/protocol/requester/warpsync/manager.go +++ b/packages/protocol/requester/warpsync/manager.go @@ -43,7 +43,7 @@ type Manager struct { validationLock sync.RWMutex syncingInProgress bool - syncingLock syncutils.RWMutexFake + syncingLock syncutils.RWMutex slotsChannels map[slot.Index]*slotChannels successfulSyncSlot slot.Index @@ -52,7 +52,7 @@ type Manager struct { } type slotChannels struct { - syncutils.RWMutexFake + syncutils.RWMutex startChan chan *slotSyncStart blockChan chan *slotSyncBlock endChan chan *slotSyncEnd diff --git a/packages/protocol/tipmanager/testframework.go b/packages/protocol/tipmanager/testframework.go index b670281684..7f617b560c 100644 --- a/packages/protocol/tipmanager/testframework.go +++ b/packages/protocol/tipmanager/testframework.go @@ -54,7 +54,7 @@ type TestFramework struct { mockAcceptance *blockgadget.MockBlockGadget scheduledBlocks *shrinkingmap.ShrinkingMap[models.BlockID, *scheduler.Block] - scheduledBlocksMutex syncutils.RWMutexFake + scheduledBlocksMutex syncutils.RWMutex test *testing.T tipAdded uint32 diff --git a/packages/protocol/tipmanager/tipmanager.go b/packages/protocol/tipmanager/tipmanager.go index 774638677a..1d61aee3e5 100644 --- a/packages/protocol/tipmanager/tipmanager.go +++ b/packages/protocol/tipmanager/tipmanager.go @@ -35,7 +35,7 @@ type TipManager struct { walkerCache *memstorage.SlotStorage[models.BlockID, types.Empty] - mutex syncutils.RWMutexFake + mutex syncutils.RWMutex tips *randommap.RandomMap[models.BlockID, *scheduler.Block] TipsConflictTracker *TipsConflictTracker diff --git a/packages/storage/permanent/settings.go b/packages/storage/permanent/settings.go index 211a9d676a..441477f1e2 100644 --- a/packages/storage/permanent/settings.go +++ b/packages/storage/permanent/settings.go @@ -21,7 +21,7 @@ import ( type Settings struct { *settingsModel - mutex syncutils.RWMutexFake + mutex syncutils.RWMutex slotTimeProvider *slot.TimeProvider diff --git a/plugins/remotemetrics/conflict.go b/plugins/remotemetrics/conflict.go index 3ab62e331d..9052b78201 100644 --- a/plugins/remotemetrics/conflict.go +++ b/plugins/remotemetrics/conflict.go @@ -1,7 +1,6 @@ package remotemetrics import ( - "sync" "time" "go.uber.org/atomic" @@ -12,6 +11,7 @@ import ( "github.com/iotaledger/goshimmer/packages/protocol/engine/tangle/booker" "github.com/iotaledger/hive.go/crypto/identity" "github.com/iotaledger/hive.go/ds/advancedset" + "github.com/iotaledger/hive.go/runtime/syncutils" ) var ( @@ -34,7 +34,7 @@ var ( // all active conflicts stored in this map, to avoid duplicated event triggers for conflict confirmation. activeConflicts *advancedset.AdvancedSet[utxo.TransactionID] - activeConflictsMutex sync.Mutex + activeConflictsMutex syncutils.Mutex ) func onConflictConfirmed(conflictID utxo.TransactionID) { diff --git a/tools/evil-spammer/interactive.go b/tools/evil-spammer/interactive.go index 9f26df4a4e..31e3e71f92 100644 --- a/tools/evil-spammer/interactive.go +++ b/tools/evil-spammer/interactive.go @@ -6,7 +6,6 @@ import ( "io" "os" "strconv" - "sync" "text/tabwriter" "time" @@ -17,6 +16,7 @@ import ( "github.com/iotaledger/goshimmer/client/evilspammer" "github.com/iotaledger/goshimmer/client/evilwallet" "github.com/iotaledger/hive.go/ds/types" + "github.com/iotaledger/hive.go/runtime/syncutils" ) const ( @@ -201,9 +201,9 @@ type Mode struct { activeSpammers map[int]*evilspammer.Spammer spammerLog *SpammerLog - spamMutex sync.Mutex + spamMutex syncutils.Mutex - stdOutMutex sync.Mutex + stdOutMutex syncutils.Mutex } func NewInteractiveMode() *Mode { @@ -810,7 +810,7 @@ type SpammerLog struct { spamStartTime []time.Time spamStopTime []time.Time tabWriter io.Writer - mu sync.Mutex + mu syncutils.Mutex } func NewSpammerLog() *SpammerLog { diff --git a/tools/integration-tests/tester/framework/network.go b/tools/integration-tests/tester/framework/network.go index 6d09ef40b2..ddfea22d0a 100644 --- a/tools/integration-tests/tester/framework/network.go +++ b/tools/integration-tests/tester/framework/network.go @@ -4,10 +4,10 @@ import ( "context" "fmt" "log" - "sync" "time" "github.com/iotaledger/goshimmer/packages/core/snapshotcreator" + "github.com/iotaledger/hive.go/runtime/syncutils" "github.com/docker/docker/api/types" "github.com/docker/docker/client" @@ -223,7 +223,7 @@ func (n *Network) Shutdown(ctx context.Context) error { // stop all peers in parallel var eg errgroup.Group - var exitStatusMutex sync.Mutex + var exitStatusMutex syncutils.Mutex for _, peer := range n.peers { peer := peer // capture range variable eg.Go(func() error { diff --git a/tools/integration-tests/tester/go.mod b/tools/integration-tests/tester/go.mod index abc53c45ad..afea314a6b 100644 --- a/tools/integration-tests/tester/go.mod +++ b/tools/integration-tests/tester/go.mod @@ -8,10 +8,10 @@ require ( github.com/docker/docker v20.10.24+incompatible github.com/docker/go-connections v0.4.0 github.com/iotaledger/goshimmer v0.1.3 - github.com/iotaledger/hive.go/crypto v0.0.0-20230417125513-e2e89991217f - github.com/iotaledger/hive.go/ds v0.0.0-20230417125513-e2e89991217f - github.com/iotaledger/hive.go/lo v0.0.0-20230417125513-e2e89991217f - github.com/iotaledger/hive.go/runtime v0.0.0-20230417125513-e2e89991217f + github.com/iotaledger/hive.go/crypto v0.0.0-20230425063402-a1a1712d13a2 + github.com/iotaledger/hive.go/ds v0.0.0-20230425063402-a1a1712d13a2 + github.com/iotaledger/hive.go/lo v0.0.0-20230425063402-a1a1712d13a2 + github.com/iotaledger/hive.go/runtime v0.0.0-20230425063402-a1a1712d13a2 github.com/mr-tron/base58 v1.2.0 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.8.2 @@ -40,7 +40,7 @@ require ( github.com/docker/go-units v0.5.0 // indirect github.com/elastic/gosigar v0.14.2 // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/ethereum/go-ethereum v1.11.5 // indirect + github.com/ethereum/go-ethereum v1.11.6 // indirect github.com/fatih/structs v1.1.0 // indirect github.com/felixge/fgprof v0.9.3 // indirect github.com/flynn/noise v1.0.0 // indirect @@ -56,7 +56,7 @@ require ( github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/gopacket v1.1.19 // indirect github.com/google/pprof v0.0.0-20230405160723-4a4c7d95572b // indirect github.com/google/uuid v1.3.0 // indirect @@ -64,16 +64,16 @@ require ( github.com/huin/goupnp v1.1.0 // indirect github.com/iancoleman/orderedmap v0.2.0 // indirect github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 // indirect - github.com/iotaledger/hive.go/ads v0.0.0-20230417125513-e2e89991217f // indirect - github.com/iotaledger/hive.go/app v0.0.0-20230417125513-e2e89991217f // indirect - github.com/iotaledger/hive.go/autopeering v0.0.0-20230417125513-e2e89991217f // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20230417125513-e2e89991217f // indirect - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230417125513-e2e89991217f // indirect - github.com/iotaledger/hive.go/kvstore v0.0.0-20230417125513-e2e89991217f // indirect - github.com/iotaledger/hive.go/logger v0.0.0-20230417125513-e2e89991217f // indirect - github.com/iotaledger/hive.go/objectstorage v0.0.0-20230417125513-e2e89991217f // indirect - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230417125513-e2e89991217f // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20230417125513-e2e89991217f // indirect + github.com/iotaledger/hive.go/ads v0.0.0-20230425063402-a1a1712d13a2 // indirect + github.com/iotaledger/hive.go/app v0.0.0-20230425063402-a1a1712d13a2 // indirect + github.com/iotaledger/hive.go/autopeering v0.0.0-20230425063402-a1a1712d13a2 // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20230425063402-a1a1712d13a2 // indirect + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230425063402-a1a1712d13a2 // indirect + github.com/iotaledger/hive.go/kvstore v0.0.0-20230425063402-a1a1712d13a2 // indirect + github.com/iotaledger/hive.go/logger v0.0.0-20230425063402-a1a1712d13a2 // indirect + github.com/iotaledger/hive.go/objectstorage v0.0.0-20230425063402-a1a1712d13a2 // indirect + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230425063402-a1a1712d13a2 // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20230425063402-a1a1712d13a2 // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/ipfs/go-log/v2 v2.5.1 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect diff --git a/tools/integration-tests/tester/go.sum b/tools/integration-tests/tester/go.sum index 4de160b977..eb15f008b7 100644 --- a/tools/integration-tests/tester/go.sum +++ b/tools/integration-tests/tester/go.sum @@ -137,8 +137,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/ethereum/go-ethereum v1.11.5 h1:3M1uan+LAUvdn+7wCEFrcMM4LJTeuxDrPTg/f31a5QQ= -github.com/ethereum/go-ethereum v1.11.5/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= +github.com/ethereum/go-ethereum v1.11.6 h1:2VF8Mf7XiSUfmoNOy3D+ocfl9Qu8baQBrCNbo2CXQ8E= +github.com/ethereum/go-ethereum v1.11.6/go.mod h1:+a8pUj1tOyJ2RinsNQD4326YS+leSoKGiG/uVVb0x6Y= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= @@ -271,8 +271,8 @@ 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.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -349,7 +349,7 @@ github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKe github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hjson/hjson-go/v4 v4.0.0 h1:wlm6IYYqHjOdXH1gHev4VoXCaW20HdQAGCxdOEEg2cs= github.com/hjson/hjson-go/v4 v4.0.0/go.mod h1:KaYt3bTw3zhBjYqnXkYywcYctk0A2nxeEFTse3rH13E= -github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= +github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c h1:DZfsyhDK1hnSS5lH8l+JggqzEleHteTYfutAiVlSUM8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goupnp v1.1.0 h1:gEe0Dp/lZmPZiDFzJJaOfUpOvv2MKUkoBX8lDrn9vKU= @@ -364,34 +364,34 @@ github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/C github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PTNgli6EbS4tV9qu3QAm/kBU3XaYZV2xdzys= github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw= -github.com/iotaledger/hive.go/ads v0.0.0-20230417125513-e2e89991217f h1:plS7qPSBQZvxaUWm53sMOrv5jC83Bki1CJbhAnLXf9Y= -github.com/iotaledger/hive.go/ads v0.0.0-20230417125513-e2e89991217f/go.mod h1:wPxiUI/+jRqeHm/WQO70agvAWeouxzlkha0CkCpCNjs= -github.com/iotaledger/hive.go/app v0.0.0-20230417125513-e2e89991217f h1:7KxnUM6z9qjNPJThLCCneQAAtqMDcnfv/nDh78qgFRM= -github.com/iotaledger/hive.go/app v0.0.0-20230417125513-e2e89991217f/go.mod h1:vMXrLYkkHAqQC8yGLXcB1Adq9s3hPPf8Dv4sfd/koas= -github.com/iotaledger/hive.go/autopeering v0.0.0-20230417125513-e2e89991217f h1:a6SK3bEMe6/eP0++EMljy3Ldgn7XLwsXKU9sLBXh3dM= -github.com/iotaledger/hive.go/autopeering v0.0.0-20230417125513-e2e89991217f/go.mod h1:WDIeFSOpeEL1MNSQBlWr0FgIxke+UlrYJ37ncQP+Fl0= -github.com/iotaledger/hive.go/constraints v0.0.0-20230417125513-e2e89991217f h1:CmfPv23a32gSf3iYx0LAHRKZydt9hPgnRTknR85Cles= -github.com/iotaledger/hive.go/constraints v0.0.0-20230417125513-e2e89991217f/go.mod h1:bvXXc6quBdERMMKnirr2+iQU4WnTz4KDbdHcusW9Ats= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230417125513-e2e89991217f h1:qjwpHDPMAq0BLVol8lWylMPFE/tSKTl6xDR1mBnUoAE= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230417125513-e2e89991217f/go.mod h1:DG3Z4F+nBNapmU3RaWUS/5YUtqzaj/EclUkRrV74rV4= -github.com/iotaledger/hive.go/crypto v0.0.0-20230417125513-e2e89991217f h1:fUUKFqf2SBBqHffRYqML+aoCwzw5s+9QmTV3nB+EydM= -github.com/iotaledger/hive.go/crypto v0.0.0-20230417125513-e2e89991217f/go.mod h1:xp9Wbk2vp4LHb0xTbDRphSJLgLYvRNNe5lWHd8OLI5c= -github.com/iotaledger/hive.go/ds v0.0.0-20230417125513-e2e89991217f h1:LQxEzB+w5aC+wdjz2AYAwzwJz0gars8Ibuau4EYSxL8= -github.com/iotaledger/hive.go/ds v0.0.0-20230417125513-e2e89991217f/go.mod h1:wwPP73b6InomUeirqEfaYNqoTsuzxNZPa/ci4efzuyU= -github.com/iotaledger/hive.go/kvstore v0.0.0-20230417125513-e2e89991217f h1:G074X16SOzjiBJtQkIfAvjm+dX8T4IhvztyK81V8uro= -github.com/iotaledger/hive.go/kvstore v0.0.0-20230417125513-e2e89991217f/go.mod h1:oET9GdiN58SWw+INHuNwmiBlfmfRyoe1cJMx7TYk1Js= -github.com/iotaledger/hive.go/lo v0.0.0-20230417125513-e2e89991217f h1:Q1MM9T6zE9iXk6QtUgqGzxuk9j7pNapbB0iD+39VNNA= -github.com/iotaledger/hive.go/lo v0.0.0-20230417125513-e2e89991217f/go.mod h1:dsAfSt53PGgT3n675q2wFLGcvRlLNS3Affhf+vnFbb4= -github.com/iotaledger/hive.go/logger v0.0.0-20230417125513-e2e89991217f h1:i0Hyuamj1iRRixOusCCMlHkHR/NAs9+cv/lFUV94kts= -github.com/iotaledger/hive.go/logger v0.0.0-20230417125513-e2e89991217f/go.mod h1:7ZE+E8JgqJ9zxg5/FOObEfYyBpC813TMv6Qzcm2YekY= -github.com/iotaledger/hive.go/objectstorage v0.0.0-20230417125513-e2e89991217f h1:10ZUosNi8HCD7KyWWm2kocacqCj52l/yGlOVYNgJRSA= -github.com/iotaledger/hive.go/objectstorage v0.0.0-20230417125513-e2e89991217f/go.mod h1:E7/slsvlTsSP+laCKWbBOmSPg83UTh9mPm8ostFOlv4= -github.com/iotaledger/hive.go/runtime v0.0.0-20230417125513-e2e89991217f h1:c3PjrBnD26nlUOPlBlF1dS4sv1LN5ndJqfUvWwO9jwQ= -github.com/iotaledger/hive.go/runtime v0.0.0-20230417125513-e2e89991217f/go.mod h1:kYmuL6D9aDLqLpskEEC+DGKXC/9mx7wtLF0WItRuexs= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230417125513-e2e89991217f h1:tUw+oQKBsM67QeI3dGKhb7p/ziZ35+pgN9fu8W06UFY= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230417125513-e2e89991217f/go.mod h1:NrZTRu5hrKwSxzPyA5G8BxaQakOLRvoFJM+5vtHDE04= -github.com/iotaledger/hive.go/stringify v0.0.0-20230417125513-e2e89991217f h1:C2AIi1lpQieqa5piGeJN0byheffJNF0aMiiyUujU1b8= -github.com/iotaledger/hive.go/stringify v0.0.0-20230417125513-e2e89991217f/go.mod h1:l/F3cA/+67QdNj+sohv2v4HhmsdOcWScoA+sVYoAE4c= +github.com/iotaledger/hive.go/ads v0.0.0-20230425063402-a1a1712d13a2 h1:XwuBd2W1VcAwMfgLJP5WJCo4d9b7ssXB2aongJAaY9g= +github.com/iotaledger/hive.go/ads v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:wPxiUI/+jRqeHm/WQO70agvAWeouxzlkha0CkCpCNjs= +github.com/iotaledger/hive.go/app v0.0.0-20230425063402-a1a1712d13a2 h1:Z2x8TvwMUUbCrk1SDU99Ij+/WbpiuFB8RTrIKToyaxw= +github.com/iotaledger/hive.go/app v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:vMXrLYkkHAqQC8yGLXcB1Adq9s3hPPf8Dv4sfd/koas= +github.com/iotaledger/hive.go/autopeering v0.0.0-20230425063402-a1a1712d13a2 h1:PREknjsj8V4sMVD3sR6+fEb/sOeYf07En+OSFp6yGjg= +github.com/iotaledger/hive.go/autopeering v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:WDIeFSOpeEL1MNSQBlWr0FgIxke+UlrYJ37ncQP+Fl0= +github.com/iotaledger/hive.go/constraints v0.0.0-20230425063402-a1a1712d13a2 h1:lp4PmIk2lJoPbIXs25n7Hyb0Q8BSGRWfxnWVhX7z6l0= +github.com/iotaledger/hive.go/constraints v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:bvXXc6quBdERMMKnirr2+iQU4WnTz4KDbdHcusW9Ats= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230425063402-a1a1712d13a2 h1:RH1NTY0HfBCRp88px8qZ7Cn28R3mTt/1yDRxNwKCHhc= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230425063402-a1a1712d13a2/go.mod h1:DG3Z4F+nBNapmU3RaWUS/5YUtqzaj/EclUkRrV74rV4= +github.com/iotaledger/hive.go/crypto v0.0.0-20230425063402-a1a1712d13a2 h1:gukBhOoK7NdjTGSiWc+ixDipNycWIiRLjxTB7oaGm0g= +github.com/iotaledger/hive.go/crypto v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:xp9Wbk2vp4LHb0xTbDRphSJLgLYvRNNe5lWHd8OLI5c= +github.com/iotaledger/hive.go/ds v0.0.0-20230425063402-a1a1712d13a2 h1:UJ2/JF5OpkLjA7rSTFPf0SO1mwCYWvxCqRm0u4ePPWU= +github.com/iotaledger/hive.go/ds v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:wwPP73b6InomUeirqEfaYNqoTsuzxNZPa/ci4efzuyU= +github.com/iotaledger/hive.go/kvstore v0.0.0-20230425063402-a1a1712d13a2 h1:0w+4/SXRRQSKS/w7eqPdw/tueymY/W4mZG5eJRBv7Fo= +github.com/iotaledger/hive.go/kvstore v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:oET9GdiN58SWw+INHuNwmiBlfmfRyoe1cJMx7TYk1Js= +github.com/iotaledger/hive.go/lo v0.0.0-20230425063402-a1a1712d13a2 h1:RzyniGJR0ydfc6ZyfzCLrTlef6N4Y2wpzsc+pYSjog8= +github.com/iotaledger/hive.go/lo v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:dsAfSt53PGgT3n675q2wFLGcvRlLNS3Affhf+vnFbb4= +github.com/iotaledger/hive.go/logger v0.0.0-20230425063402-a1a1712d13a2 h1:wnCXalueu/SfiISMTeAKXlxl9AiZQLUo/4HdP+BuZDc= +github.com/iotaledger/hive.go/logger v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:7ZE+E8JgqJ9zxg5/FOObEfYyBpC813TMv6Qzcm2YekY= +github.com/iotaledger/hive.go/objectstorage v0.0.0-20230425063402-a1a1712d13a2 h1:UhivYtaraLed69zqyfDVfxzdfZsqrYemGQrK2VVmYeM= +github.com/iotaledger/hive.go/objectstorage v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:E7/slsvlTsSP+laCKWbBOmSPg83UTh9mPm8ostFOlv4= +github.com/iotaledger/hive.go/runtime v0.0.0-20230425063402-a1a1712d13a2 h1:8rpKh1ePJsEDEzWdDstS10zisik03DaElmcIS9Rl464= +github.com/iotaledger/hive.go/runtime v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:kYmuL6D9aDLqLpskEEC+DGKXC/9mx7wtLF0WItRuexs= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230425063402-a1a1712d13a2 h1:dIe9DBZ9R1tdjDcdaiOO6+AjvnryLerQZpmqAg/5LYU= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230425063402-a1a1712d13a2/go.mod h1:NrZTRu5hrKwSxzPyA5G8BxaQakOLRvoFJM+5vtHDE04= +github.com/iotaledger/hive.go/stringify v0.0.0-20230425063402-a1a1712d13a2 h1:6FRZKhOiQEGhnrvS1uYdrCc+f9FIqiuUd7odspJJYVc= +github.com/iotaledger/hive.go/stringify v0.0.0-20230425063402-a1a1712d13a2/go.mod h1:l/F3cA/+67QdNj+sohv2v4HhmsdOcWScoA+sVYoAE4c= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk=