Skip to content

Commit fc26d2f

Browse files
authored
Merge pull request #909 from onflow/mpeter/update-to-latest-geth
Update `ethereum/go-ethereum` version to `v1.16.4`
2 parents 05cfde8 + 55cdc41 commit fc26d2f

File tree

11 files changed

+111
-71
lines changed

11 files changed

+111
-71
lines changed

api/pull.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ func (api *PullAPI) NewFilter(ctx context.Context, criteria filters.FilterCriter
247247
return "", err
248248
}
249249

250+
if !logs.ValidCriteriaLimits(criteria) {
251+
return "", errs.ErrExceedLogQueryLimit
252+
}
253+
250254
latest, err := api.blocks.LatestEVMHeight()
251255
if err != nil {
252256
return "", err

api/stream.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"github.com/onflow/flow-evm-gateway/config"
1515
ethTypes "github.com/onflow/flow-evm-gateway/eth/types"
1616
"github.com/onflow/flow-evm-gateway/models"
17+
errs "github.com/onflow/flow-evm-gateway/models/errors"
1718
"github.com/onflow/flow-evm-gateway/services/logs"
1819
"github.com/onflow/flow-evm-gateway/storage"
1920
)
@@ -92,6 +93,10 @@ func (s *StreamAPI) NewPendingTransactions(ctx context.Context, fullTx *bool) (*
9293

9394
// Logs creates a subscription that fires for all new log that match the given filter criteria.
9495
func (s *StreamAPI) Logs(ctx context.Context, criteria filters.FilterCriteria) (*rpc.Subscription, error) {
96+
if !logs.ValidCriteriaLimits(criteria) {
97+
return nil, errs.ErrExceedLogQueryLimit
98+
}
99+
95100
return newSubscription(
96101
ctx,
97102
s.logger,

go.mod

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ go 1.25.0
44

55
require (
66
github.com/cockroachdb/pebble v1.1.5
7-
github.com/ethereum/go-ethereum v1.16.3
7+
github.com/ethereum/go-ethereum v1.16.4
88
github.com/goccy/go-json v0.10.4
99
github.com/hashicorp/go-multierror v1.1.1
1010
github.com/hashicorp/golang-lru/v2 v2.0.7
1111
github.com/holiman/uint256 v1.3.2
12-
github.com/onflow/atree v0.10.1
13-
github.com/onflow/cadence v1.7.1
14-
github.com/onflow/flow-go v0.43.1-rc.10
15-
github.com/onflow/flow-go-sdk v1.8.4
12+
github.com/onflow/atree v0.11.0
13+
github.com/onflow/cadence v1.8.1
14+
github.com/onflow/flow-go v0.43.3-0.20251020174348-b36af5491350
15+
github.com/onflow/flow-go-sdk v1.9.0
1616
github.com/prometheus/client_golang v1.20.5
1717
github.com/rs/cors v1.8.0
1818
github.com/rs/zerolog v1.33.0
@@ -58,7 +58,7 @@ require (
5858
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
5959
github.com/consensys/gnark-crypto v0.18.0 // indirect
6060
github.com/coreos/go-semver v0.3.0 // indirect
61-
github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect
61+
github.com/crate-crypto/go-eth-kzg v1.4.0 // indirect
6262
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
6363
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
6464
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
@@ -71,7 +71,8 @@ require (
7171
github.com/dustin/go-humanize v1.0.1 // indirect
7272
github.com/ef-ds/deque v1.0.4 // indirect
7373
github.com/emicklei/dot v1.6.2 // indirect
74-
github.com/ethereum/c-kzg-4844/v2 v2.1.0 // indirect
74+
github.com/ethereum/c-kzg-4844/v2 v2.1.3 // indirect
75+
github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab // indirect
7576
github.com/ethereum/go-verkle v0.2.2 // indirect
7677
github.com/felixge/httpsnoop v1.0.4 // indirect
7778
github.com/ferranbt/fastssz v0.1.4 // indirect
@@ -89,7 +90,7 @@ require (
8990
github.com/golang/glog v1.2.5 // indirect
9091
github.com/golang/protobuf v1.5.4 // indirect
9192
github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e // indirect
92-
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
93+
github.com/google/pprof v0.0.0-20250630185457-6e76a2b096b5 // indirect
9394
github.com/google/s2a-go v0.1.9 // indirect
9495
github.com/google/uuid v1.6.0 // indirect
9596
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
@@ -184,7 +185,7 @@ require (
184185
github.com/spf13/viper v1.15.0 // indirect
185186
github.com/stretchr/objx v0.5.2 // indirect
186187
github.com/subosito/gotenv v1.4.2 // indirect
187-
github.com/supranational/blst v0.3.14 // indirect
188+
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe // indirect
188189
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
189190
github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8b0eaed6c // indirect
190191
github.com/tklauser/go-sysconf v0.3.12 // indirect
@@ -210,7 +211,7 @@ require (
210211
golang.org/x/crypto v0.41.0 // indirect
211212
golang.org/x/net v0.43.0 // indirect
212213
golang.org/x/oauth2 v0.30.0 // indirect
213-
golang.org/x/sys v0.35.0 // indirect
214+
golang.org/x/sys v0.36.0 // indirect
214215
golang.org/x/text v0.28.0 // indirect
215216
golang.org/x/time v0.12.0 // indirect
216217
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect

go.sum

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV
141141
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
142142
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
143143
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
144-
github.com/crate-crypto/go-eth-kzg v1.3.0 h1:05GrhASN9kDAidaFJOda6A4BEvgvuXbazXg/0E3OOdI=
145-
github.com/crate-crypto/go-eth-kzg v1.3.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI=
144+
github.com/crate-crypto/go-eth-kzg v1.4.0 h1:WzDGjHk4gFg6YzV0rJOAsTK4z3Qkz5jd4RE3DAvPFkg=
145+
github.com/crate-crypto/go-eth-kzg v1.4.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI=
146146
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a h1:W8mUrRp6NOVl3J+MYp5kPMoUZPp7aOYHtaua31lwRHg=
147147
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a/go.mod h1:sTwzHBvIzm2RfVCGNEBZgRyjwK40bVoun3ZnGOCafNM=
148148
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
@@ -192,10 +192,12 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
192192
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
193193
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
194194
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
195-
github.com/ethereum/c-kzg-4844/v2 v2.1.0 h1:gQropX9YFBhl3g4HYhwE70zq3IHFRgbbNPw0Shwzf5w=
196-
github.com/ethereum/c-kzg-4844/v2 v2.1.0/go.mod h1:TC48kOKjJKPbN7C++qIgt0TJzZ70QznYR7Ob+WXl57E=
197-
github.com/ethereum/go-ethereum v1.16.3 h1:nDoBSrmsrPbrDIVLTkDQCy1U9KdHN+F2PzvMbDoS42Q=
198-
github.com/ethereum/go-ethereum v1.16.3/go.mod h1:Lrsc6bt9Gm9RyvhfFK53vboCia8kpF9nv+2Ukntnl+8=
195+
github.com/ethereum/c-kzg-4844/v2 v2.1.3 h1:DQ21UU0VSsuGy8+pcMJHDS0CV1bKmJmxsJYK8l3MiLU=
196+
github.com/ethereum/c-kzg-4844/v2 v2.1.3/go.mod h1:fyNcYI/yAuLWJxf4uzVtS8VDKeoAaRM8G/+ADz/pRdA=
197+
github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab h1:rvv6MJhy07IMfEKuARQ9TKojGqLVNxQajaXEp/BoqSk=
198+
github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab/go.mod h1:IuLm4IsPipXKF7CW5Lzf68PIbZ5yl7FFd74l/E0o9A8=
199+
github.com/ethereum/go-ethereum v1.16.4 h1:H6dU0r2p/amA7cYg6zyG9Nt2JrKKH6oX2utfcqrSpkQ=
200+
github.com/ethereum/go-ethereum v1.16.4/go.mod h1:P7551slMFbjn2zOQaKrJShZVN/d8bGxp4/I6yZVlb5w=
199201
github.com/ethereum/go-verkle v0.2.2 h1:I2W0WjnrFUIzzVPwm8ykY+7pL2d4VhlsePn4j7cnFk8=
200202
github.com/ethereum/go-verkle v0.2.2/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk=
201203
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
@@ -338,8 +340,8 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe
338340
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
339341
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
340342
github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg=
341-
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg=
342-
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
343+
github.com/google/pprof v0.0.0-20250630185457-6e76a2b096b5 h1:xhMrHhTJ6zxu3gA4enFM9MLn9AY7613teCdFnlUVbSQ=
344+
github.com/google/pprof v0.0.0-20250630185457-6e76a2b096b5/go.mod h1:5hDyRhoBCxViHszMt12TnOpEI4VVi+U8Gm9iphldiMA=
343345
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
344346
github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0=
345347
github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM=
@@ -550,10 +552,10 @@ github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JX
550552
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
551553
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
552554
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
553-
github.com/onflow/atree v0.10.1 h1:8sixWP3l3LitcyuKkVepbIsLbfr7JN3cCB/iA1j2JD8=
554-
github.com/onflow/atree v0.10.1/go.mod h1:+BuiL0XuIigHJqwkdIuDNzxXvyDx1jYUog/w+iZhcE8=
555-
github.com/onflow/cadence v1.7.1 h1:VpPiC13e4qrdpyqaagd+dpHtQwfJ/djr97FgT3SovWA=
556-
github.com/onflow/cadence v1.7.1/go.mod h1:1lKdLNVHIoO0jEjkRPMtOmBWYCG1An9TXSoiCuGIIpo=
555+
github.com/onflow/atree v0.11.0 h1:NrGHb7l3pKvFPFAdYfEyezg6D7xBNcMSwQHliOHtZug=
556+
github.com/onflow/atree v0.11.0/go.mod h1:uZE/bzDfMLXJH9BYL8HxNisw9pHZGyc+mDLuSMeUAVY=
557+
github.com/onflow/cadence v1.8.1 h1:nWx+USGs/+NIVHd5RYlzEulzsqYQp0uSKDqVYBub3w4=
558+
github.com/onflow/cadence v1.8.1/go.mod h1:08FmLMsBjhRTgE9tmiSJjFNJrjcuTUawQFFUQq8J1Y4=
557559
github.com/onflow/crypto v0.25.3 h1:XQ3HtLsw8h1+pBN+NQ1JYM9mS2mVXTyg55OldaAIF7U=
558560
github.com/onflow/crypto v0.25.3/go.mod h1:+1igaXiK6Tjm9wQOBD1EGwW7bYWMUGKtwKJ/2QL/OWs=
559561
github.com/onflow/fixed-point v0.1.1 h1:j0jYZVO8VGyk1476alGudEg7XqCkeTVxb5ElRJRKS90=
@@ -568,10 +570,10 @@ github.com/onflow/flow-ft/lib/go/contracts v1.0.1 h1:Ts5ob+CoCY2EjEd0W6vdLJ7hLL3
568570
github.com/onflow/flow-ft/lib/go/contracts v1.0.1/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A=
569571
github.com/onflow/flow-ft/lib/go/templates v1.0.1 h1:FDYKAiGowABtoMNusLuRCILIZDtVqJ/5tYI4VkF5zfM=
570572
github.com/onflow/flow-ft/lib/go/templates v1.0.1/go.mod h1:uQ8XFqmMK2jxyBSVrmyuwdWjTEb+6zGjRYotfDJ5pAE=
571-
github.com/onflow/flow-go v0.43.1-rc.10 h1:zNSYLLuB2Da7R9g/b6FFK60/UEvdgsdLD1MPVo4ZLtg=
572-
github.com/onflow/flow-go v0.43.1-rc.10/go.mod h1:pRsxdt8GYriAfP4RjUsCJ505MQcAZgyZq7K4DuWxrXI=
573-
github.com/onflow/flow-go-sdk v1.8.4 h1:WHtVjryOU6ZJx0jUSjBPOrWoGqGDr+eEejyIkfbiBCE=
574-
github.com/onflow/flow-go-sdk v1.8.4/go.mod h1:Jli9sI78LAnoC3OVGeAs0ngOezoLTfE/GrKOAB9TbTw=
573+
github.com/onflow/flow-go v0.43.3-0.20251020174348-b36af5491350 h1:iNea1ILZJOtYo1USv35XDvUHgMEB0SLVQMxgEZXmK1s=
574+
github.com/onflow/flow-go v0.43.3-0.20251020174348-b36af5491350/go.mod h1:vQVi9g5rzW1mYPvCj33qSI9Ug4B+wvrtD8a64cXU9QQ=
575+
github.com/onflow/flow-go-sdk v1.9.0 h1:VzIF38lO09LM2Sb4RxdWUf7QR4fEyDXg70vUNOQXYgQ=
576+
github.com/onflow/flow-go-sdk v1.9.0/go.mod h1:YwYB4z96zR4IspPvXYTCtE+TsQ/mZECgQfns0Sa7mw8=
575577
github.com/onflow/flow-nft/lib/go/contracts v1.3.0 h1:DmNop+O0EMyicZvhgdWboFG57xz5t9Qp81FKlfKyqJc=
576578
github.com/onflow/flow-nft/lib/go/contracts v1.3.0/go.mod h1:eZ9VMMNfCq0ho6kV25xJn1kXeCfxnkhj3MwF3ed08gY=
577579
github.com/onflow/flow-nft/lib/go/templates v1.3.0 h1:uGIBy4GEY6Z9hKP7sm5nA5kwvbvLWW4nWx5NN9Wg0II=
@@ -766,8 +768,8 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
766768
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
767769
github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8=
768770
github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
769-
github.com/supranational/blst v0.3.14 h1:xNMoHRJOTwMn63ip6qoWJ2Ymgvj7E2b9jY2FAwY+qRo=
770-
github.com/supranational/blst v0.3.14/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
771+
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe h1:nbdqkIGOGfUAD54q1s2YBcBz/WcsxCO9HUQ4aGV5hUw=
772+
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
771773
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
772774
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
773775
github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8b0eaed6c h1:HelZ2kAFadG0La9d+4htN4HzQ68Bm2iM9qKMSMES6xg=
@@ -1055,8 +1057,8 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
10551057
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
10561058
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
10571059
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
1058-
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
1059-
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
1060+
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
1061+
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
10601062
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
10611063
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
10621064
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=

models/errors/errors.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ var (
1616
ErrEndpointNotSupported = errors.New("endpoint is not supported")
1717
ErrRateLimit = errors.New("limit of requests per second reached")
1818
ErrIndexOnlyMode = errors.New("transaction submission not allowed in index-only mode")
19+
ErrExceedLogQueryLimit = errors.New("exceed max addresses or topics per search position")
1920

2021
// General errors
2122

services/logs/filter.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import (
1111
"github.com/onflow/flow-evm-gateway/storage"
1212
)
1313

14+
const LogQueryLimit = 1000
15+
1416
// RangeFilter matches all the indexed logs within the range defined as
1517
// start and end block height. The start must be strictly smaller or equal than end value.
1618
type RangeFilter struct {
@@ -24,6 +26,10 @@ func NewRangeFilter(
2426
criteria filters.FilterCriteria,
2527
receipts storage.ReceiptIndexer,
2628
) (*RangeFilter, error) {
29+
if !ValidCriteriaLimits(criteria) {
30+
return nil, errs.ErrExceedLogQueryLimit
31+
}
32+
2733
// make sure that beginning number is not bigger than end
2834
if start > end {
2935
return nil, fmt.Errorf(
@@ -100,6 +106,10 @@ func NewIDFilter(
100106
blocks storage.BlockIndexer,
101107
receipts storage.ReceiptIndexer,
102108
) (*IDFilter, error) {
109+
if !ValidCriteriaLimits(criteria) {
110+
return nil, errs.ErrExceedLogQueryLimit
111+
}
112+
103113
if criteria.BlockHash == nil {
104114
return nil, fmt.Errorf("filter criteria should have a non-nil block hash")
105115
}
@@ -161,6 +171,20 @@ func ExactMatch(log *gethTypes.Log, criteria filters.FilterCriteria) bool {
161171
return slices.Contains(criteria.Addresses, log.Address)
162172
}
163173

174+
func ValidCriteriaLimits(criteria filters.FilterCriteria) bool {
175+
if len(criteria.Addresses) > LogQueryLimit {
176+
return false
177+
}
178+
179+
for _, topics := range criteria.Topics {
180+
if len(topics) > LogQueryLimit {
181+
return false
182+
}
183+
}
184+
185+
return true
186+
}
187+
164188
// bloomMatch takes a bloom value and tests if the addresses and topics provided pass the bloom filter.
165189
// This acts as a fast probabilistic test that might produce false-positives but not false-negatives.
166190
// If true is returned we should further check against the exactMatch to really make sure the log is matched.

tests/go.mod

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ module github.com/onflow/flow-evm-gateway/integration
33
go 1.25.0
44

55
require (
6-
github.com/ethereum/go-ethereum v1.16.3
6+
github.com/ethereum/go-ethereum v1.16.4
77
github.com/goccy/go-json v0.10.4
8-
github.com/onflow/cadence v1.7.1
8+
github.com/onflow/cadence v1.8.1
99
github.com/onflow/crypto v0.25.3
10-
github.com/onflow/flow-emulator v1.8.1-0.20251017090934-67e23d049041
10+
github.com/onflow/flow-emulator v1.8.1-0.20251020221841-9ce0f73af018
1111
github.com/onflow/flow-evm-gateway v0.0.0-20240201154855-4d4d3d3f19c7
12-
github.com/onflow/flow-go v0.43.1-rc.10
13-
github.com/onflow/flow-go-sdk v1.8.4
12+
github.com/onflow/flow-go v0.43.3-0.20251020174348-b36af5491350
13+
github.com/onflow/flow-go-sdk v1.9.0
1414
github.com/rs/zerolog v1.34.0
1515
github.com/stretchr/testify v1.11.1
1616
golang.org/x/sync v0.16.0
@@ -49,7 +49,7 @@ require (
4949
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
5050
github.com/consensys/gnark-crypto v0.18.0 // indirect
5151
github.com/coreos/go-semver v0.3.0 // indirect
52-
github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect
52+
github.com/crate-crypto/go-eth-kzg v1.4.0 // indirect
5353
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
5454
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
5555
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
@@ -66,7 +66,8 @@ require (
6666
github.com/dustin/go-humanize v1.0.1 // indirect
6767
github.com/ef-ds/deque v1.0.4 // indirect
6868
github.com/emicklei/dot v1.6.2 // indirect
69-
github.com/ethereum/c-kzg-4844/v2 v2.1.0 // indirect
69+
github.com/ethereum/c-kzg-4844/v2 v2.1.3 // indirect
70+
github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab // indirect
7071
github.com/ethereum/go-verkle v0.2.2 // indirect
7172
github.com/felixge/httpsnoop v1.0.4 // indirect
7273
github.com/ferranbt/fastssz v0.1.4 // indirect
@@ -90,7 +91,7 @@ require (
9091
github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e // indirect
9192
github.com/google/go-cmp v0.7.0 // indirect
9293
github.com/google/go-dap v0.11.0 // indirect
93-
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
94+
github.com/google/pprof v0.0.0-20250630185457-6e76a2b096b5 // indirect
9495
github.com/google/s2a-go v0.1.9 // indirect
9596
github.com/google/uuid v1.6.0 // indirect
9697
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
@@ -154,7 +155,7 @@ require (
154155
github.com/multiformats/go-varint v0.0.7 // indirect
155156
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
156157
github.com/olekukonko/tablewriter v0.0.5 // indirect
157-
github.com/onflow/atree v0.10.1 // indirect
158+
github.com/onflow/atree v0.11.0 // indirect
158159
github.com/onflow/fixed-point v0.1.1 // indirect
159160
github.com/onflow/flow-core-contracts/lib/go/contracts v1.9.0 // indirect
160161
github.com/onflow/flow-core-contracts/lib/go/templates v1.9.0 // indirect
@@ -205,7 +206,7 @@ require (
205206
github.com/spf13/viper v1.15.0 // indirect
206207
github.com/stretchr/objx v0.5.2 // indirect
207208
github.com/subosito/gotenv v1.4.2 // indirect
208-
github.com/supranational/blst v0.3.14 // indirect
209+
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe // indirect
209210
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
210211
github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8b0eaed6c // indirect
211212
github.com/tklauser/go-sysconf v0.3.12 // indirect
@@ -235,7 +236,7 @@ require (
235236
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect
236237
golang.org/x/net v0.43.0 // indirect
237238
golang.org/x/oauth2 v0.30.0 // indirect
238-
golang.org/x/sys v0.35.0 // indirect
239+
golang.org/x/sys v0.36.0 // indirect
239240
golang.org/x/term v0.34.0 // indirect
240241
golang.org/x/text v0.28.0 // indirect
241242
golang.org/x/time v0.12.0 // indirect

0 commit comments

Comments
 (0)