Skip to content

Commit ea9bbe9

Browse files
authored
1935 fix concurrent writes (#1936)
* make icq-relayer and xcclookup use latest release * fixes #1935; make response mutex part of the object, not local to the function; change to RWMutex; add getter; add test * fix lint issue * go work sync after bumping QS dependency * ensure all calls to response.Assets and response.Messages use the mutex guarded getters and setters, to ensure thread-safety. Add new struct for JSON marshalling that doesn't include the mutex. Update instance where test was comparing response objects, which is now not possible because of copying locks, so we compare individual values * linty
1 parent 75ad3b3 commit ea9bbe9

File tree

10 files changed

+177
-156
lines changed

10 files changed

+177
-156
lines changed

go.work.sum

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3
150150
cloud.google.com/go/compute v1.31.1 h1:SObuy8Fs6woazArpXp1fsHCw+ZH4iJ/8dGGTxUhHZQA=
151151
cloud.google.com/go/compute v1.31.1/go.mod h1:hyOponWhXviDptJCJSoEh89XO1cfv616wbwbkde1/+8=
152152
cloud.google.com/go/compute v1.37.0/go.mod h1:AsK4VqrSyXBo4SMbRtfAO1VfaMjUEjEwv1UB/AwVp5Q=
153+
cloud.google.com/go/compute v1.40.0 h1:dlEzKo/BtyEGNc+SflXwwoBh52dNl/A5BaSYurT0k0k=
153154
cloud.google.com/go/compute v1.40.0/go.mod h1:P1doTJnlwurJDzIQFMp4mgU+vyCe9HU2NWTlqTfq3MY=
154155
cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
155156
cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k=
@@ -692,10 +693,12 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26
692693
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
693694
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
694695
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a h1:pv34s756C4pEXnjgPfGYgdhg/ZdajGhyOvzx8k+23nw=
696+
github.com/ashanbrown/forbidigo v1.3.0 h1:VkYIwb/xxdireGAdJNZoo24O4lmnEWkactplBlWTShc=
695697
github.com/ashanbrown/forbidigo v1.3.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI=
696698
github.com/ashanbrown/forbidigo v1.5.1/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU=
697699
github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8gerOIVIY=
698700
github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU=
701+
github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s=
699702
github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI=
700703
github.com/ashanbrown/makezero v1.2.0 h1:/2Lp1bypdmK9wDIq7uWBlDF1iMUpIIS4A+pF6C9IEUU=
701704
github.com/ashanbrown/makezero v1.2.0/go.mod h1:dxlPhHbDMC6N6xICzFBSK+4njQDdK8euNO0qjQMtGY4=
@@ -1152,6 +1155,7 @@ github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6
11521155
github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ=
11531156
github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2/go.mod h1:9wOXstvyDRshQ9LggQuzBCGysxs3b6Uo/1MvYCR2NMs=
11541157
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d/go.mod h1:ivJ9QDg0XucIkmwhzCDsqcnxxlDStoTl89jDMIoNxKY=
1158+
github.com/golangci/golangci-lint v1.50.1 h1:C829clMcZXEORakZlwpk7M4iDw2XiwxxKaG504SZ9zY=
11551159
github.com/golangci/golangci-lint v1.50.1/go.mod h1:AQjHBopYS//oB8xs0y0M/dtxdKHkdhl0RvmjUct0/4w=
11561160
github.com/golangci/golangci-lint v1.52.0/go.mod h1:wlTh+d/oVlgZC2yCe6nlxrxNAnuhEQC0Zdygoh72Uak=
11571161
github.com/golangci/golangci-lint v1.64.6 h1:jOLaQN41IV7bMzXuNC4UnQGll7N1xY6eFDXkXEPGKAs=
@@ -1752,6 +1756,7 @@ github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71 h1:CN
17521756
github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50=
17531757
github.com/quasilyte/gogrep v0.0.0-20220828223005-86e4605de09f/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng=
17541758
github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0=
1759+
github.com/quicksilver-zone/quicksilver v1.9.0/go.mod h1:usPseXkervkElaIfwtefU8O1+tp900IpywJLL8HBEZs=
17551760
github.com/rabbitmq/amqp091-go v1.2.0 h1:1pHBxAsQh54R9eX/xo679fUEAfv3loMqi0pvRFOj2nk=
17561761
github.com/rabbitmq/amqp091-go v1.2.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM=
17571762
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=

icq-relayer/go.mod

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require (
1313
github.com/go-kit/log v0.2.1
1414
github.com/mitchellh/go-homedir v1.1.0
1515
github.com/prometheus/client_golang v1.22.0
16-
github.com/quicksilver-zone/quicksilver v1.8.0-beta.11
16+
github.com/quicksilver-zone/quicksilver v1.9.0
1717
github.com/rs/zerolog v1.34.0
1818
github.com/spf13/cobra v1.9.1
1919
github.com/spf13/viper v1.20.1
@@ -129,7 +129,6 @@ require (
129129
github.com/iancoleman/orderedmap v0.3.0 // indirect
130130
github.com/improbable-eng/grpc-web v0.15.0 // indirect
131131
github.com/inconshreveable/mousetrap v1.1.0 // indirect
132-
github.com/ingenuity-build/multierror v0.1.0 // indirect
133132
github.com/jmespath/go-jmespath v0.4.0 // indirect
134133
github.com/jmhodges/levigo v1.0.0 // indirect
135134
github.com/klauspost/compress v1.18.0 // indirect
@@ -144,12 +143,9 @@ require (
144143
github.com/minio/highwayhash v1.0.3 // indirect
145144
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
146145
github.com/mitchellh/mapstructure v1.5.0 // indirect
147-
github.com/moby/sys/user v0.4.0 // indirect
148146
github.com/mtibben/percent v0.2.1 // indirect
149147
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
150148
github.com/onsi/gomega v1.37.0 // indirect
151-
github.com/opencontainers/image-spec v1.1.1 // indirect
152-
github.com/opencontainers/runc v1.3.0 // indirect
153149
github.com/osmosis-labs/osmosis/osmomath v0.0.16 // indirect
154150
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
155151
github.com/petermattis/goid v0.0.0-20250508124226-395b08cebbdb // indirect

icq-relayer/go.sum

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,8 +1181,6 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt
11811181
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
11821182
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
11831183
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
1184-
github.com/ingenuity-build/multierror v0.1.0 h1:nS+YE/+ujwtl09kNWsIMNu8TUjs9PKrtnP5x45txxOs=
1185-
github.com/ingenuity-build/multierror v0.1.0/go.mod h1:ZU6BORie0gkg/hhdTvEH979RsaCE2Wdsxph9AISVmac=
11861184
github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=
11871185
github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo=
11881186
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
@@ -1409,8 +1407,7 @@ github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7D
14091407
github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw=
14101408
github.com/quicksilver-zone/osmomath v0.0.16-sdk47 h1:89yl/1QKksSaZtXX8bF1y3UwBulBvv97F27sWB6mBT4=
14111409
github.com/quicksilver-zone/osmomath v0.0.16-sdk47/go.mod h1:6Uhjlk6eybH2M4ARYcKW+/mYlh/0Shmpl1xcPVl/lOA=
1412-
github.com/quicksilver-zone/quicksilver v1.8.0-beta.11 h1:0HnRfrGQqqSkQsZ1GawkR/cdaOUMOYcG9pq1Kj24rUQ=
1413-
github.com/quicksilver-zone/quicksilver v1.8.0-beta.11/go.mod h1:nhMPGdihMJDS7C+5eQdEE/YEk1TaxjjCPQ1V+uKBlBA=
1410+
github.com/quicksilver-zone/quicksilver v1.9.0 h1:+umE5e01bBSdKP12s5QwR+nOrvkybCUAUC1GQAU6K04=
14141411
github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ=
14151412
github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc=
14161413
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=

xcclookup/go.mod

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ require (
1010
github.com/go-kit/log v0.2.1
1111
github.com/golangci/golangci-lint/v2 v2.2.2
1212
github.com/gorilla/mux v1.8.1
13-
github.com/quicksilver-zone/quicksilver v1.8.2-0.20250707101051-6cb838a1fa0e
1413
github.com/stretchr/testify v1.10.0
1514
go.uber.org/multierr v1.11.0
1615
golang.org/x/tools v0.35.0
@@ -21,9 +20,6 @@ require (
2120
require (
2221
4d63.com/gocheckcompilerdirectives v1.3.0 // indirect
2322
4d63.com/gochecknoglobals v0.2.2 // indirect
24-
cloud.google.com/go v0.121.4 // indirect
25-
cloud.google.com/go/auth v0.16.3 // indirect
26-
cloud.google.com/go/storage v1.55.0 // indirect
2723
codeberg.org/chavacava/garif v0.2.0 // indirect
2824
cosmossdk.io/api v0.3.1 // indirect
2925
cosmossdk.io/core v0.5.1 // indirect
@@ -43,7 +39,6 @@ require (
4339
github.com/DataDog/zstd v1.5.7 // indirect
4440
github.com/Djarvur/go-err113 v0.1.0 // indirect
4541
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.1 // indirect
46-
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 // indirect
4742
github.com/Masterminds/semver/v3 v3.4.0 // indirect
4843
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect
4944
github.com/alecthomas/chroma/v2 v2.19.0 // indirect
@@ -55,7 +50,6 @@ require (
5550
github.com/armon/go-metrics v0.4.1 // indirect
5651
github.com/ashanbrown/forbidigo/v2 v2.1.0 // indirect
5752
github.com/ashanbrown/makezero/v2 v2.0.1 // indirect
58-
github.com/aws/aws-sdk-go v1.55.7 // indirect
5953
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
6054
github.com/beorn7/perks v1.0.1 // indirect
6155
github.com/bgentry/speakeasy v0.2.0 // indirect
@@ -66,20 +60,19 @@ require (
6660
github.com/breml/bidichk v0.3.3 // indirect
6761
github.com/breml/errchkjson v0.4.1 // indirect
6862
github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect
63+
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect
6964
github.com/butuzov/ireturn v0.4.0 // indirect
7065
github.com/butuzov/mirror v1.3.0 // indirect
7166
github.com/catenacyber/perfsprint v0.9.1 // indirect
7267
github.com/ccojocar/zxcvbn-go v1.0.4 // indirect
73-
github.com/celestiaorg/go-square/v2 v2.3.1 // indirect
74-
github.com/celestiaorg/nmt v0.24.0 // indirect
68+
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
7569
github.com/cespare/xxhash/v2 v2.3.0 // indirect
7670
github.com/charithe/durationcheck v0.0.10 // indirect
7771
github.com/charmbracelet/colorprofile v0.3.1 // indirect
7872
github.com/charmbracelet/lipgloss v1.1.0 // indirect
7973
github.com/charmbracelet/x/ansi v0.9.3 // indirect
8074
github.com/charmbracelet/x/cellbuf v0.0.13 // indirect
8175
github.com/charmbracelet/x/term v0.2.1 // indirect
82-
github.com/chzyer/readline v1.5.1 // indirect
8376
github.com/ckaznocha/intrange v0.3.1 // indirect
8477
github.com/cockroachdb/errors v1.12.0 // indirect
8578
github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 // indirect
@@ -94,17 +87,16 @@ require (
9487
github.com/cosmos/go-bip39 v1.0.0 // indirect
9588
github.com/cosmos/gogoproto v1.7.0 // indirect
9689
github.com/cosmos/iavl v0.20.1 // indirect
97-
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.3.0 // indirect
98-
github.com/cosmos/ibc-go/v7 v7.10.0 // indirect
99-
github.com/cosmos/ics23/go v0.11.0 // indirect
10090
github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect
91+
github.com/creachadair/taskgroup v0.13.2 // indirect
10192
github.com/curioswitch/go-reassign v0.3.0 // indirect
10293
github.com/daixiang0/gci v0.13.6 // indirect
10394
github.com/danieljoos/wincred v1.2.2 // indirect
10495
github.com/dave/dst v0.27.3 // indirect
10596
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
10697
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
10798
github.com/denis-tingaikin/go-header v0.5.0 // indirect
99+
github.com/desertbit/timer v1.0.1 // indirect
108100
github.com/dgraph-io/badger/v4 v4.8.0 // indirect
109101
github.com/dgraph-io/ristretto/v2 v2.2.0 // indirect
110102
github.com/dlclark/regexp2 v1.11.5 // indirect
@@ -119,7 +111,6 @@ require (
119111
github.com/getsentry/sentry-go v0.34.1 // indirect
120112
github.com/ghostiam/protogetter v0.3.15 // indirect
121113
github.com/go-critic/go-critic v0.13.0 // indirect
122-
github.com/go-jose/go-jose/v4 v4.1.1 // indirect
123114
github.com/go-kit/kit v0.13.0 // indirect
124115
github.com/go-logfmt/logfmt v0.6.0 // indirect
125116
github.com/go-logr/logr v1.4.3 // indirect
@@ -137,6 +128,7 @@ require (
137128
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
138129
github.com/gofrs/flock v0.12.1 // indirect
139130
github.com/gogo/protobuf v1.3.3 // indirect
131+
github.com/golang/mock v1.7.0-rc.1 // indirect
140132
github.com/golang/protobuf v1.5.4 // indirect
141133
github.com/golang/snappy v1.0.0 // indirect
142134
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect
@@ -151,8 +143,8 @@ require (
151143
github.com/google/btree v1.1.3 // indirect
152144
github.com/google/flatbuffers v25.2.10+incompatible // indirect
153145
github.com/google/go-cmp v0.7.0 // indirect
154-
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
155146
github.com/gordonklaus/ineffassign v0.1.0 // indirect
147+
github.com/gorilla/handlers v1.5.2 // indirect
156148
github.com/gorilla/websocket v1.5.3 // indirect
157149
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
158150
github.com/gostaticanalysis/comment v1.5.0 // indirect
@@ -172,7 +164,6 @@ require (
172164
github.com/hexops/gotextdiff v1.0.3 // indirect
173165
github.com/huandu/skiplist v1.2.1 // indirect
174166
github.com/inconshreveable/mousetrap v1.1.0 // indirect
175-
github.com/ingenuity-build/multierror v0.1.0 // indirect
176167
github.com/jgautheron/goconst v1.8.2 // indirect
177168
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
178169
github.com/jjti/go-spancheck v0.6.5 // indirect
@@ -196,7 +187,6 @@ require (
196187
github.com/linxGnu/grocksdb v1.10.1 // indirect
197188
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
198189
github.com/macabu/inamedparam v0.2.0 // indirect
199-
github.com/manifoldco/promptui v0.9.0 // indirect
200190
github.com/manuelarte/embeddedstructfieldcheck v0.3.0 // indirect
201191
github.com/manuelarte/funcorder v0.5.0 // indirect
202192
github.com/maratori/testableexamples v1.0.0 // indirect
@@ -216,7 +206,8 @@ require (
216206
github.com/nishanths/exhaustive v0.12.0 // indirect
217207
github.com/nishanths/predeclared v0.2.2 // indirect
218208
github.com/nunnatsa/ginkgolinter v0.19.1 // indirect
219-
github.com/osmosis-labs/osmosis/osmomath v0.0.16 // indirect
209+
github.com/nxadm/tail v1.4.11 // indirect
210+
github.com/onsi/ginkgo v1.16.5 // indirect
220211
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
221212
github.com/petermattis/goid v0.0.0-20250508124226-395b08cebbdb //indirect
222213
github.com/pkg/errors v0.9.1 // indirect
@@ -286,9 +277,6 @@ require (
286277
go.augendre.info/fatcontext v0.8.0 // indirect
287278
go.etcd.io/bbolt v1.4.2 // indirect
288279
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
289-
go.opentelemetry.io/contrib/detectors/gcp v1.37.0 // indirect
290-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.62.0 // indirect
291-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect
292280
go.opentelemetry.io/otel v1.37.0 // indirect
293281
go.opentelemetry.io/otel/metric v1.37.0 // indirect
294282
go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect
@@ -305,13 +293,11 @@ require (
305293
golang.org/x/sys v0.34.0 // indirect
306294
golang.org/x/term v0.33.0 // indirect
307295
golang.org/x/text v0.27.0 // indirect
308-
google.golang.org/api v0.242.0 // indirect
309296
google.golang.org/genproto v0.0.0-20250715232539-7130f93afb79 // indirect
310297
google.golang.org/genproto/googleapis/api v0.0.0-20250715232539-7130f93afb79 // indirect
311298
google.golang.org/genproto/googleapis/rpc v0.0.0-20250715232539-7130f93afb79 // indirect
312299
google.golang.org/grpc v1.75.0-dev // indirect
313300
google.golang.org/protobuf v1.36.6 // indirect
314-
gopkg.in/yaml.v2 v2.4.0 // indirect
315301
honnef.co/go/tools v0.6.1 // indirect
316302
mvdan.cc/unparam v0.0.0-20250301125049-0df0534333a4 // indirect
317303
nhooyr.io/websocket v1.8.17 // indirect

0 commit comments

Comments
 (0)