Skip to content

Commit d6f5195

Browse files
committed
add cache for sig verification
1 parent 19e57dd commit d6f5195

File tree

47 files changed

+194
-13
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+194
-13
lines changed

client/v2/go.mod

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ require (
1919
sigs.k8s.io/yaml v1.4.0
2020
)
2121

22+
require github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
23+
2224
require (
2325
cosmossdk.io/collections v0.4.0 // indirect
2426
cosmossdk.io/errors v1.0.0 // indirect

client/v2/go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
449449
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
450450
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
451451
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
452+
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
453+
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
452454
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
453455
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
454456
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=

go.mod

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ require (
3737
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
3838
github.com/grpc-ecosystem/grpc-gateway v1.16.0
3939
github.com/hashicorp/go-metrics v0.5.1
40-
github.com/hashicorp/golang-lru v1.0.2
40+
github.com/hashicorp/golang-lru/v2 v2.0.7
4141
github.com/hdevalence/ed25519consensus v0.1.0
4242
github.com/huandu/skiplist v1.2.0
4343
github.com/improbable-eng/grpc-web v0.15.0
@@ -108,6 +108,7 @@ require (
108108
github.com/hashicorp/go-hclog v1.5.0 // indirect
109109
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
110110
github.com/hashicorp/go-plugin v1.5.2 // indirect
111+
github.com/hashicorp/golang-lru v1.0.2 // indirect
111112
github.com/hashicorp/hcl v1.0.0 // indirect
112113
github.com/hashicorp/yamux v0.1.1 // indirect
113114
github.com/iancoleman/strcase v0.3.0 // indirect

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
450450
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
451451
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
452452
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
453+
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
454+
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
453455
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
454456
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
455457
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=

simapp/go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ require (
130130
github.com/hashicorp/go-safetemp v1.0.0 // indirect
131131
github.com/hashicorp/go-version v1.6.0 // indirect
132132
github.com/hashicorp/golang-lru v1.0.2 // indirect
133+
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
133134
github.com/hashicorp/hcl v1.0.0 // indirect
134135
github.com/hashicorp/yamux v0.1.1 // indirect
135136
github.com/hdevalence/ed25519consensus v0.1.0 // indirect

simapp/go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
665665
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
666666
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
667667
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
668+
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
669+
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
668670
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
669671
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
670672
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=

tests/go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ require (
129129
github.com/hashicorp/go-safetemp v1.0.0 // indirect
130130
github.com/hashicorp/go-version v1.6.0 // indirect
131131
github.com/hashicorp/golang-lru v1.0.2 // indirect
132+
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
132133
github.com/hashicorp/hcl v1.0.0 // indirect
133134
github.com/hashicorp/yamux v0.1.1 // indirect
134135
github.com/hdevalence/ed25519consensus v0.1.0 // indirect

tests/go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
664664
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
665665
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
666666
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
667+
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
668+
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
667669
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
668670
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
669671
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=

tests/starship/tests/go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ require (
151151
github.com/hashicorp/go-safetemp v1.0.0 // indirect
152152
github.com/hashicorp/go-version v1.6.0 // indirect
153153
github.com/hashicorp/golang-lru v1.0.2 // indirect
154+
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
154155
github.com/hashicorp/hcl v1.0.0 // indirect
155156
github.com/hashicorp/yamux v0.1.1 // indirect
156157
github.com/hdevalence/ed25519consensus v0.1.0 // indirect

tests/starship/tests/go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
668668
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
669669
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
670670
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
671+
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
672+
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
671673
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
672674
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
673675
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=

types/address.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"sync"
1111
"sync/atomic"
1212

13-
"github.com/hashicorp/golang-lru/simplelru"
13+
"github.com/hashicorp/golang-lru/v2/simplelru"
1414
"sigs.k8s.io/yaml"
1515

1616
errorsmod "cosmossdk.io/errors"
@@ -81,11 +81,11 @@ var (
8181
// AccAddress.String() is expensive and if unoptimized dominantly showed up in profiles,
8282
// yet has no mechanisms to trivially cache the result given that AccAddress is a []byte type.
8383
accAddrMu sync.Mutex
84-
accAddrCache *simplelru.LRU
84+
accAddrCache *simplelru.LRU[string, string]
8585
consAddrMu sync.Mutex
86-
consAddrCache *simplelru.LRU
86+
consAddrCache *simplelru.LRU[string, string]
8787
valAddrMu sync.Mutex
88-
valAddrCache *simplelru.LRU
88+
valAddrCache *simplelru.LRU[string, string]
8989

9090
isCachingEnabled atomic.Bool
9191
)
@@ -101,13 +101,13 @@ func init() {
101101

102102
// in total the cache size is 61k entries. Key is 32 bytes and value is around 50-70 bytes.
103103
// That will make around 92 * 61k * 2 (LRU) bytes ~ 11 MB
104-
if accAddrCache, err = simplelru.NewLRU(60000, nil); err != nil {
104+
if accAddrCache, err = simplelru.NewLRU[string, string](60000, nil); err != nil {
105105
panic(err)
106106
}
107-
if consAddrCache, err = simplelru.NewLRU(500, nil); err != nil {
107+
if consAddrCache, err = simplelru.NewLRU[string, string](500, nil); err != nil {
108108
panic(err)
109109
}
110-
if valAddrCache, err = simplelru.NewLRU(500, nil); err != nil {
110+
if valAddrCache, err = simplelru.NewLRU[string, string](500, nil); err != nil {
111111
panic(err)
112112
}
113113
}
@@ -309,7 +309,7 @@ func (aa AccAddress) String() string {
309309

310310
addr, ok := accAddrCache.Get(key)
311311
if ok {
312-
return addr.(string)
312+
return addr
313313
}
314314
}
315315
return cacheBech32Addr(GetConfig().GetBech32AccountAddrPrefix(), aa, accAddrCache, key)
@@ -463,7 +463,7 @@ func (va ValAddress) String() string {
463463

464464
addr, ok := valAddrCache.Get(key)
465465
if ok {
466-
return addr.(string)
466+
return addr
467467
}
468468
}
469469
return cacheBech32Addr(GetConfig().GetBech32ValidatorAddrPrefix(), va, valAddrCache, key)
@@ -623,7 +623,7 @@ func (ca ConsAddress) String() string {
623623

624624
addr, ok := consAddrCache.Get(key)
625625
if ok {
626-
return addr.(string)
626+
return addr
627627
}
628628
}
629629
return cacheBech32Addr(GetConfig().GetBech32ConsensusAddrPrefix(), ca, consAddrCache, key)
@@ -699,7 +699,7 @@ func addressBytesFromHexString(address string) ([]byte, error) {
699699
}
700700

701701
// cacheBech32Addr is not concurrency safe. Concurrent access to cache causes race condition.
702-
func cacheBech32Addr(prefix string, addr []byte, cache *simplelru.LRU, cacheKey string) string {
702+
func cacheBech32Addr(prefix string, addr []byte, cache *simplelru.LRU[string, string], cacheKey string) string {
703703
bech32Addr, err := bech32.ConvertAndEncode(prefix, addr)
704704
if err != nil {
705705
panic(err)

x/accounts/go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ require (
8484
github.com/hashicorp/go-metrics v0.5.1 // indirect
8585
github.com/hashicorp/go-plugin v1.5.2 // indirect
8686
github.com/hashicorp/golang-lru v1.0.2 // indirect
87+
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
8788
github.com/hashicorp/hcl v1.0.0 // indirect
8889
github.com/hashicorp/yamux v0.1.1 // indirect
8990
github.com/hdevalence/ed25519consensus v0.1.0 // indirect

x/accounts/go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
430430
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
431431
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
432432
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
433+
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
434+
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
433435
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
434436
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
435437
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=

x/auth/go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ require (
2424
github.com/google/gofuzz v1.2.0
2525
github.com/grpc-ecosystem/grpc-gateway v1.16.0
2626
github.com/hashicorp/go-metrics v0.5.1
27+
github.com/hashicorp/golang-lru/v2 v2.0.7
2728
github.com/spf13/cobra v1.8.0
2829
github.com/spf13/viper v1.17.0
2930
github.com/stretchr/testify v1.8.4

x/auth/go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
449449
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
450450
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
451451
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
452+
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
453+
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
452454
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
453455
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
454456
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=

x/auth/signing/cache.go

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
package signing
2+
3+
import (
4+
lru "github.com/hashicorp/golang-lru/v2"
5+
)
6+
7+
var signatureCache *Cache
8+
9+
const (
10+
TxHashLen = 32
11+
AddressStringLen = 2 + 20*2
12+
)
13+
14+
func init() {
15+
// used for ut
16+
defaultCache := &Cache{
17+
data: &lru.Cache[string, []byte]{},
18+
}
19+
signatureCache = defaultCache
20+
}
21+
22+
// InitSignatureCache initializes the signature cache.
23+
// signature verification is one of the most expensive parts in verification
24+
// by caching it we avoid needing to verify the same signature multiple times
25+
func NewSignatureCache() {
26+
// 500 * (32 + 42) = 37.5KB
27+
cache, err := lru.New[string, []byte](500)
28+
if err != nil {
29+
panic(err)
30+
}
31+
signatureCache = &Cache{
32+
data: cache,
33+
}
34+
}
35+
36+
func SignatureCache() *Cache {
37+
return signatureCache
38+
}
39+
40+
type Cache struct {
41+
data *lru.Cache[string, []byte]
42+
}
43+
44+
func (c *Cache) Get(key []byte) ([]byte, bool) {
45+
// validate
46+
if !c.validate(key) {
47+
return nil, false
48+
}
49+
// get cache
50+
value, ok := c.data.Get(string(key))
51+
if ok {
52+
return value, true
53+
}
54+
return nil, false
55+
}
56+
57+
func (c *Cache) Add(key, value []byte) {
58+
// validate
59+
if !c.validate(key) {
60+
return
61+
}
62+
// add cache
63+
c.data.Add(string(key), value)
64+
}
65+
66+
func (c *Cache) Remove(key []byte) {
67+
// validate
68+
if !c.validate(key) {
69+
return
70+
}
71+
c.data.Remove(string(key))
72+
}
73+
74+
func (c *Cache) validate(key []byte) bool {
75+
// validate key
76+
if len(key) == 0 {
77+
return false
78+
}
79+
// validate lru cache
80+
if c.data == nil {
81+
return false
82+
}
83+
return true
84+
}

x/auth/signing/verify.go

+22-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package signing
22

33
import (
4+
"bytes"
45
"context"
6+
"crypto/sha256"
57
"fmt"
68

79
signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1"
@@ -57,6 +59,25 @@ func internalSignModeToAPI(mode signing.SignMode) (signingv1beta1.SignMode, erro
5759
}
5860
}
5961

62+
// VerifysignatureCache is a cache of verified signatures
63+
// If the cached item is not found, it will be verified and added to the cache
64+
func verifySig(signBytes, sig []byte, pubKey cryptotypes.PubKey) bool {
65+
bz := sha256.Sum256(append(signBytes, sig...))
66+
hash := bz[:]
67+
cachePub, ok := SignatureCache().Get(hash)
68+
if ok {
69+
SignatureCache().Remove(hash)
70+
return bytes.Equal(pubKey.Bytes(), cachePub)
71+
}
72+
if !pubKey.VerifySignature(signBytes, sig) {
73+
return false
74+
}
75+
76+
SignatureCache().Add(hash, pubKey.Bytes())
77+
78+
return true
79+
}
80+
6081
// VerifySignature verifies a transaction signature contained in SignatureData abstracting over different signing
6182
// modes. It differs from VerifySignature in that it uses the new txsigning.TxData interface in x/tx.
6283
func VerifySignature(
@@ -77,7 +98,7 @@ func VerifySignature(
7798
if err != nil {
7899
return err
79100
}
80-
if !pubKey.VerifySignature(signBytes, data.Signature) {
101+
if !verifySig(signBytes, data.Signature, pubKey) {
81102
return fmt.Errorf("unable to verify single signer signature")
82103
}
83104
return nil

x/authz/go.mod

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ require (
2929
google.golang.org/protobuf v1.31.0
3030
)
3131

32+
require github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
33+
3234
require (
3335
cosmossdk.io/collections v0.4.0 // indirect
3436
cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000

x/authz/go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
455455
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
456456
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
457457
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
458+
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
459+
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
458460
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
459461
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
460462
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=

x/bank/go.mod

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ require (
2727
gotest.tools/v3 v3.5.1
2828
)
2929

30+
require github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
31+
3032
require (
3133
cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000
3234
cosmossdk.io/x/tx v0.12.0 // indirect

x/bank/go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
449449
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
450450
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
451451
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
452+
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
453+
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
452454
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
453455
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
454456
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=

x/circuit/go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ require (
8686
github.com/hashicorp/go-metrics v0.5.1 // indirect
8787
github.com/hashicorp/go-plugin v1.5.2 // indirect
8888
github.com/hashicorp/golang-lru v1.0.2 // indirect
89+
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
8990
github.com/hashicorp/hcl v1.0.0 // indirect
9091
github.com/hashicorp/yamux v0.1.1 // indirect
9192
github.com/hdevalence/ed25519consensus v0.1.0 // indirect

x/circuit/go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
449449
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
450450
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
451451
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
452+
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
453+
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
452454
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
453455
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
454456
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=

x/distribution/go.mod

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ require (
3232
gotest.tools/v3 v3.5.1
3333
)
3434

35+
require github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
36+
3537
require (
3638
cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000
3739
cosmossdk.io/x/tx v0.12.0 // indirect

0 commit comments

Comments
 (0)