From f4eff225bc2570b4ed2e72685265dbb54c9116e8 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Tue, 23 Jul 2024 16:35:58 +0200 Subject: [PATCH 01/55] update flow-emulator --- tests/go.mod | 57 +++++++++++++++++++++++++----------------------- tests/go.sum | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 27 deletions(-) diff --git a/tests/go.mod b/tests/go.mod index 2c107709..69878188 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -4,13 +4,13 @@ go 1.22 require ( github.com/goccy/go-json v0.10.2 - github.com/onflow/cadence v1.0.0-preview.36 + github.com/onflow/cadence v1.0.0-preview.38 github.com/onflow/crypto v0.25.1 - github.com/onflow/flow-emulator v1.0.0-preview.33 + github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240723143120-d2b220e499c4 github.com/onflow/flow-evm-gateway v0.0.0-20240201154855-4d4d3d3f19c7 - github.com/onflow/flow-go v0.36.0 - github.com/onflow/flow-go-sdk v1.0.0-preview.38 - github.com/onflow/go-ethereum v1.13.4 + github.com/onflow/flow-go v0.36.3-0.20240723132958-6ce4c85fdbcb + github.com/onflow/flow-go-sdk v1.0.0-preview.41 + github.com/onflow/go-ethereum v1.14.7 github.com/rs/zerolog v1.31.0 github.com/stretchr/testify v1.9.0 ) @@ -23,10 +23,10 @@ require ( cloud.google.com/go/kms v1.15.7 // indirect cloud.google.com/go/storage v1.36.0 // indirect github.com/DataDog/zstd v1.5.2 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect github.com/SaveTheRbtz/mph v0.1.1-0.20240117162131-4166ec7869bc // indirect github.com/StackExchange/wmi v1.2.1 // indirect - github.com/VictoriaMetrics/fastcache v1.12.1 // indirect + github.com/VictoriaMetrics/fastcache v1.12.2 // indirect github.com/allegro/bigcache v1.2.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect @@ -35,18 +35,20 @@ require ( github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/cp v1.1.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect - github.com/cockroachdb/redact v1.1.3 // indirect + github.com/cockroachdb/pebble v1.1.1 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/coreos/go-semver v0.3.0 // indirect - github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect + github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c // indirect + github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/deckarep/golang-set/v2 v2.1.0 // indirect + github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect @@ -56,21 +58,22 @@ require ( github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/ef-ds/deque v1.0.4 // indirect - github.com/ethereum/c-kzg-4844 v0.4.0 // indirect + github.com/ethereum/c-kzg-4844 v1.0.0 // indirect github.com/ethereum/go-ethereum v1.13.10 // indirect + github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/fxamacker/cbor/v2 v2.4.1-0.20230228173756-c0c9f774e40c // indirect github.com/fxamacker/circlehash v0.3.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect - github.com/getsentry/sentry-go v0.18.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/glebarez/go-sqlite v1.22.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-redis/redis/v8 v8.11.5 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/gofrs/flock v0.8.1 // indirect @@ -95,7 +98,7 @@ require ( github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.2.4 // indirect + github.com/holiman/uint256 v1.3.0 // indirect github.com/huandu/go-clone v1.6.0 // indirect github.com/huandu/go-clone/generic v1.7.2 // indirect github.com/huin/goupnp v1.3.0 // indirect @@ -144,13 +147,13 @@ require ( github.com/multiformats/go-varint v0.0.7 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/onflow/atree v0.7.0-rc.2 // indirect - github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0 // indirect - github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0 // indirect + github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 // indirect + github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 // indirect github.com/onflow/flow-ft/lib/go/contracts v1.0.0 // indirect github.com/onflow/flow-ft/lib/go/templates v1.0.0 // indirect github.com/onflow/flow-nft/lib/go/contracts v1.2.1 // indirect github.com/onflow/flow-nft/lib/go/templates v1.2.0 // indirect - github.com/onflow/flow/protobuf/go/flow v0.4.4 // indirect + github.com/onflow/flow/protobuf/go/flow v0.4.5 // indirect github.com/onflow/sdks v0.6.0-preview.1 // indirect github.com/onflow/wal v1.0.2 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect @@ -208,17 +211,17 @@ require ( go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.19.0 // indirect + golang.org/x/crypto v0.22.0 // indirect golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.17.0 // indirect - golang.org/x/term v0.17.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.17.0 // indirect + golang.org/x/tools v0.20.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect gonum.org/v1/gonum v0.14.0 // indirect google.golang.org/api v0.162.0 // indirect diff --git a/tests/go.sum b/tests/go.sum index fea556fa..d135f500 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -971,6 +971,8 @@ github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4K github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= @@ -985,6 +987,8 @@ github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9 github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= +github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= +github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/aclements/go-gg v0.0.0-20170118225347-6dbb4e4fefb0/go.mod h1:55qNq4vcpkIuHowELi5C8e+1yUHtoLoOUR9QU5j7Tes= github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794/go.mod h1:7e+I0LQFUI9AXWxOfsQROs9xPhoJtbsyWcjJqDd4KPY= @@ -1126,6 +1130,8 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -1162,15 +1168,23 @@ github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHy github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= @@ -1206,8 +1220,12 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80/go.mod h1:gzbVz57IDJgQ9rLQwfSk696JGWof8ftznEL9GoAv3NI= +github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c h1:uQYC5Z1mdLRPrZhHjHxufI8+2UG/i25QG92j0Er9p6I= +github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= +github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= +github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= @@ -1230,6 +1248,8 @@ github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6Uh github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= +github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= @@ -1307,10 +1327,14 @@ github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZ github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA= +github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.10.26/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= github.com/ethereum/go-ethereum v1.13.5/go.mod h1:yMTu38GSuyxaYzQMViqNmQ1s3cE84abZexQmTgenWk0= github.com/ethereum/go-ethereum v1.13.10 h1:Ppdil79nN+Vc+mXfge0AuUgmKWuVv4eMqzoIVSdqZek= github.com/ethereum/go-ethereum v1.13.10/go.mod h1:sc48XYQxCzH3fG9BcrXCOOgQk2JfZzNAmIKnceogzsA= +github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4= +github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w= 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.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= @@ -1321,6 +1345,7 @@ github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c/go.mod h1:AzA8Lj6Ytix github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= github.com/flynn/noise v1.0.1 h1:vPp/jdQLXC6ppsXSj/pM3W1BIJ5FEHE2TulSJBpb43Y= github.com/flynn/noise v1.0.1/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= @@ -1358,6 +1383,8 @@ github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= @@ -1415,6 +1442,8 @@ github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dT github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= @@ -1466,6 +1495,7 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= +github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= @@ -1705,6 +1735,8 @@ github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25 github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= +github.com/holiman/uint256 v1.3.0 h1:4wdcm/tnd0xXdu7iS3ruNvxkWwrb4aeBQv19ayYn8F4= +github.com/holiman/uint256 v1.3.0/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= @@ -2081,24 +2113,36 @@ github.com/onflow/atree v0.7.0-rc.2/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= github.com/onflow/cadence v1.0.0-preview.36 h1:mbxqoYSYiVX2Uo+Plrkmu29ezrShohlN+4Ltw0cfJxU= github.com/onflow/cadence v1.0.0-preview.36/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0= +github.com/onflow/cadence v1.0.0-preview.38 h1:Ag3V1YCErma9ZF+eaNq602Vv2lBI3ScaMUcUOFj81GQ= +github.com/onflow/cadence v1.0.0-preview.38/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0= github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/crypto v0.25.1 h1:0txy2PKPMM873JbpxQNbJmuOJtD56bfs48RQfm0ts5A= github.com/onflow/crypto v0.25.1/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0 h1:cq3RfBr9TnTSnsGlUHMjMGZib24Horfb1XJqMpkN5ew= github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= +github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 h1:q9tXLIALwQ76bO4bmSrhtTkyc2cZF4/gH11ix9E3F5k= +github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0 h1:aMFJdB2CW+Dzm+AJ5QN6J1yWh+a0l2RxHN2/TtLaXUo= github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= +github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 h1:FfhMBAb78p6VAWkJ+iqdKLErGQVQgxk5w6DP5ZruWX8= +github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= github.com/onflow/flow-emulator v1.0.0-preview.33 h1:1LFVpZJrgAZjPr5Jou3dbg6zOO5GMREnmE1dr9ndnJE= github.com/onflow/flow-emulator v1.0.0-preview.33/go.mod h1:4T/kFzo8jccGF8GbxLlu3b/jwBH6GxX8p0hTPURHZ7k= +github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240723143120-d2b220e499c4 h1:SjDUF/0piWLU0VhKq88S37OVn5OiLwpsFacHIWZjpdY= +github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240723143120-d2b220e499c4/go.mod h1:udqQTmpyghFJEFJgCAYMNxayjNMmxjTsucpu1N+7y5k= github.com/onflow/flow-ft/lib/go/contracts v1.0.0 h1:mToacZ5NWqtlWwk/7RgIl/jeKB/Sy/tIXdw90yKHcV0= github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= github.com/onflow/flow-ft/lib/go/templates v1.0.0 h1:6cMS/lUJJ17HjKBfMO/eh0GGvnpElPgBXx7h5aoWJhs= github.com/onflow/flow-ft/lib/go/templates v1.0.0/go.mod h1:uQ8XFqmMK2jxyBSVrmyuwdWjTEb+6zGjRYotfDJ5pAE= github.com/onflow/flow-go v0.36.0 h1:lWZkG9m9UhHr27CWBgUX56VcOI5yGMxy5I+waozqs1o= github.com/onflow/flow-go v0.36.0/go.mod h1:O25T9vx2IaAAz8X7asQy1DAOUZyJYegnv6TFS0g05OA= +github.com/onflow/flow-go v0.36.3-0.20240723132958-6ce4c85fdbcb h1:s8Upr7xv/Tm2LMtc8FLH7ZZ/db5L/yhPU9MFGVpjr74= +github.com/onflow/flow-go v0.36.3-0.20240723132958-6ce4c85fdbcb/go.mod h1:NKttW0i0DlJYxddJoyR+E4sukr8MeCiNvtSadnZrXjY= github.com/onflow/flow-go-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo= github.com/onflow/flow-go-sdk v1.0.0-preview.38 h1:vzTXhNkklnuxFaqhFeLPry+sud6LzhRMFFQveYJuXt4= github.com/onflow/flow-go-sdk v1.0.0-preview.38/go.mod h1:SuSH+SB9jONwjhXrb402JM7HfDLAcXRABN1wF+iYAfw= +github.com/onflow/flow-go-sdk v1.0.0-preview.41 h1:pOUAIQdlWuc90tQzYixCXkqmnoorDgsFxTu2J1wlhHA= +github.com/onflow/flow-go-sdk v1.0.0-preview.41/go.mod h1:FyJiLluqK+sNo+ky9VU6HSwVkvhv5/fKH1sIKI1yrrI= github.com/onflow/flow-nft/lib/go/contracts v1.2.1 h1:woAAS5z651sDpi7ihAHll8NvRS9uFXIXkL6xR+bKFZY= github.com/onflow/flow-nft/lib/go/contracts v1.2.1/go.mod h1:2gpbza+uzs1k7x31hkpBPlggIRkI53Suo0n2AyA2HcE= github.com/onflow/flow-nft/lib/go/templates v1.2.0 h1:JSQyh9rg0RC+D1930BiRXN8lrtMs+ubVMK6aQPon6Yc= @@ -2106,8 +2150,12 @@ github.com/onflow/flow-nft/lib/go/templates v1.2.0/go.mod h1:p+2hRvtjLUR3MW1NsoJ github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231121210617-52ee94b830c2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= github.com/onflow/flow/protobuf/go/flow v0.4.4 h1:lD1owoZGFgLcvdLZDmP0Kc4GOuQeSU3/d7hrujFzt6k= github.com/onflow/flow/protobuf/go/flow v0.4.4/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= +github.com/onflow/flow/protobuf/go/flow v0.4.5 h1:6o+pgYGqwXdEhqSJxu2BdnDXkOQVOkfGAb6IiXB+NPM= +github.com/onflow/flow/protobuf/go/flow v0.4.5/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= github.com/onflow/go-ethereum v1.13.4 h1:iNO86fm8RbBbhZ87ZulblInqCdHnAQVY8okBrNsTevc= github.com/onflow/go-ethereum v1.13.4/go.mod h1:cE/gEUkAffhwbVmMJYz+t1dAfVNHNwZCgc3BWtZxBGY= +github.com/onflow/go-ethereum v1.14.7 h1:gg3awYqI02e3AypRdpJKEvNTJ6kz/OhAqRti0h54Wlc= +github.com/onflow/go-ethereum v1.14.7/go.mod h1:zV14QLrXyYu5ucvcwHUA0r6UaqveqbXaehAVQJlSW+I= github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU= github.com/onflow/sdks v0.6.0-preview.1 h1:mb/cUezuqWEP1gFZNAgUI4boBltudv4nlfxke1KBp9k= github.com/onflow/sdks v0.6.0-preview.1/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU= @@ -2552,6 +2600,8 @@ golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2626,6 +2676,7 @@ golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2716,6 +2767,8 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20170207211851-4464e7848382/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2775,6 +2828,8 @@ golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2906,9 +2961,12 @@ golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2928,6 +2986,7 @@ golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -3046,6 +3105,7 @@ golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58 golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -3450,6 +3510,7 @@ gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= From 477bedd007f01ec4db4c2f28ee659a6170f5f45a Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Tue, 23 Jul 2024 16:36:39 +0200 Subject: [PATCH 02/55] mod tidy --- tests/go.mod | 3 -- tests/go.sum | 85 ++++++---------------------------------------------- 2 files changed, 9 insertions(+), 79 deletions(-) diff --git a/tests/go.mod b/tests/go.mod index 69878188..43f08e5e 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -75,7 +75,6 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-redis/redis/v8 v8.11.5 // indirect - github.com/go-stack/stack v1.8.1 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.0 // indirect @@ -213,7 +212,6 @@ require ( go.uber.org/zap v1.26.0 // indirect golang.org/x/crypto v0.22.0 // indirect golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect - golang.org/x/mod v0.17.0 // indirect golang.org/x/net v0.24.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect golang.org/x/sync v0.7.0 // indirect @@ -221,7 +219,6 @@ require ( golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.20.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect gonum.org/v1/gonum v0.14.0 // indirect google.golang.org/api v0.162.0 // indirect diff --git a/tests/go.sum b/tests/go.sum index d135f500..96539e0a 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -956,9 +956,7 @@ github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= @@ -969,7 +967,6 @@ github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0 github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= @@ -985,7 +982,6 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= -github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= @@ -1128,7 +1124,6 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -1161,28 +1156,21 @@ github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/P github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM= github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= @@ -1222,7 +1210,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80/go.mod h1:gzbVz57IDJgQ9rLQwfSk696JGWof8ftznEL9GoAv3NI= github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c h1:uQYC5Z1mdLRPrZhHjHxufI8+2UG/i25QG92j0Er9p6I= github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= -github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= @@ -1246,7 +1233,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR6AkioZ1ySsx5yxlDQZ8stG2b88gTPxgJU= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= -github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= @@ -1325,7 +1311,6 @@ github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7 github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA= github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= @@ -1343,9 +1328,9 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= +github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= github.com/flynn/noise v1.0.1 h1:vPp/jdQLXC6ppsXSj/pM3W1BIJ5FEHE2TulSJBpb43Y= github.com/flynn/noise v1.0.1/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= @@ -1380,9 +1365,6 @@ github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x github.com/gballet/go-verkle v0.0.0-20230607174250-df487255f46b/go.mod h1:CDncRYVRSDqwakm282WEkjfaAj1hxU/v5RXxk5nXOiI= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= @@ -1440,8 +1422,6 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= @@ -1466,7 +1446,6 @@ github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5Nq github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= @@ -1487,7 +1466,6 @@ github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14j github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -1497,8 +1475,6 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= @@ -1590,6 +1566,8 @@ github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= @@ -1733,8 +1711,6 @@ github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZ github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= -github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= -github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/holiman/uint256 v1.3.0 h1:4wdcm/tnd0xXdu7iS3ruNvxkWwrb4aeBQv19ayYn8F4= github.com/holiman/uint256 v1.3.0/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -1750,7 +1726,6 @@ github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -1801,8 +1776,6 @@ github.com/ipld/go-ipld-prime v0.21.0/go.mod h1:3RLqy//ERg/y5oShXXdx5YIp50cFGOan github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= @@ -1850,14 +1823,9 @@ github.com/k0kubun/pp v3.0.1+incompatible/go.mod h1:GWse8YhT0p8pT4ir3ZgBbfZild3t github.com/k0kubun/pp/v3 v3.2.0/go.mod h1:ODtJQbQcIRfAD3N+theGCV1m/CBxweERz2dapdz1EwA= github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kevinburke/go-bindata v3.23.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM= github.com/kevinburke/go-bindata v3.24.0+incompatible h1:qajFA3D0pH94OTLU4zcCCKCDgR+Zr2cZK/RPJHDdFoY= @@ -1872,7 +1840,6 @@ github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= @@ -1911,7 +1878,6 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= @@ -1979,7 +1945,6 @@ github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -2017,7 +1982,6 @@ github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvls github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.57 h1:Jzi7ApEIzwEPLHWRcafCN9LZSBbqQpxjt/wpgvg7wcM= @@ -2111,36 +2075,24 @@ github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs github.com/onflow/atree v0.7.0-rc.2 h1:mZmVrl/zPlfI44EjV3FdR2QwIqT8nz1sCONUBFcML/U= github.com/onflow/atree v0.7.0-rc.2/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM= github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= -github.com/onflow/cadence v1.0.0-preview.36 h1:mbxqoYSYiVX2Uo+Plrkmu29ezrShohlN+4Ltw0cfJxU= -github.com/onflow/cadence v1.0.0-preview.36/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0= github.com/onflow/cadence v1.0.0-preview.38 h1:Ag3V1YCErma9ZF+eaNq602Vv2lBI3ScaMUcUOFj81GQ= github.com/onflow/cadence v1.0.0-preview.38/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0= github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/crypto v0.25.1 h1:0txy2PKPMM873JbpxQNbJmuOJtD56bfs48RQfm0ts5A= github.com/onflow/crypto v0.25.1/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= -github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0 h1:cq3RfBr9TnTSnsGlUHMjMGZib24Horfb1XJqMpkN5ew= -github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 h1:q9tXLIALwQ76bO4bmSrhtTkyc2cZF4/gH11ix9E3F5k= github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= -github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0 h1:aMFJdB2CW+Dzm+AJ5QN6J1yWh+a0l2RxHN2/TtLaXUo= -github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 h1:FfhMBAb78p6VAWkJ+iqdKLErGQVQgxk5w6DP5ZruWX8= github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= -github.com/onflow/flow-emulator v1.0.0-preview.33 h1:1LFVpZJrgAZjPr5Jou3dbg6zOO5GMREnmE1dr9ndnJE= -github.com/onflow/flow-emulator v1.0.0-preview.33/go.mod h1:4T/kFzo8jccGF8GbxLlu3b/jwBH6GxX8p0hTPURHZ7k= github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240723143120-d2b220e499c4 h1:SjDUF/0piWLU0VhKq88S37OVn5OiLwpsFacHIWZjpdY= github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240723143120-d2b220e499c4/go.mod h1:udqQTmpyghFJEFJgCAYMNxayjNMmxjTsucpu1N+7y5k= github.com/onflow/flow-ft/lib/go/contracts v1.0.0 h1:mToacZ5NWqtlWwk/7RgIl/jeKB/Sy/tIXdw90yKHcV0= github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= github.com/onflow/flow-ft/lib/go/templates v1.0.0 h1:6cMS/lUJJ17HjKBfMO/eh0GGvnpElPgBXx7h5aoWJhs= github.com/onflow/flow-ft/lib/go/templates v1.0.0/go.mod h1:uQ8XFqmMK2jxyBSVrmyuwdWjTEb+6zGjRYotfDJ5pAE= -github.com/onflow/flow-go v0.36.0 h1:lWZkG9m9UhHr27CWBgUX56VcOI5yGMxy5I+waozqs1o= -github.com/onflow/flow-go v0.36.0/go.mod h1:O25T9vx2IaAAz8X7asQy1DAOUZyJYegnv6TFS0g05OA= github.com/onflow/flow-go v0.36.3-0.20240723132958-6ce4c85fdbcb h1:s8Upr7xv/Tm2LMtc8FLH7ZZ/db5L/yhPU9MFGVpjr74= github.com/onflow/flow-go v0.36.3-0.20240723132958-6ce4c85fdbcb/go.mod h1:NKttW0i0DlJYxddJoyR+E4sukr8MeCiNvtSadnZrXjY= github.com/onflow/flow-go-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo= -github.com/onflow/flow-go-sdk v1.0.0-preview.38 h1:vzTXhNkklnuxFaqhFeLPry+sud6LzhRMFFQveYJuXt4= -github.com/onflow/flow-go-sdk v1.0.0-preview.38/go.mod h1:SuSH+SB9jONwjhXrb402JM7HfDLAcXRABN1wF+iYAfw= github.com/onflow/flow-go-sdk v1.0.0-preview.41 h1:pOUAIQdlWuc90tQzYixCXkqmnoorDgsFxTu2J1wlhHA= github.com/onflow/flow-go-sdk v1.0.0-preview.41/go.mod h1:FyJiLluqK+sNo+ky9VU6HSwVkvhv5/fKH1sIKI1yrrI= github.com/onflow/flow-nft/lib/go/contracts v1.2.1 h1:woAAS5z651sDpi7ihAHll8NvRS9uFXIXkL6xR+bKFZY= @@ -2148,12 +2100,8 @@ github.com/onflow/flow-nft/lib/go/contracts v1.2.1/go.mod h1:2gpbza+uzs1k7x31hkp github.com/onflow/flow-nft/lib/go/templates v1.2.0 h1:JSQyh9rg0RC+D1930BiRXN8lrtMs+ubVMK6aQPon6Yc= github.com/onflow/flow-nft/lib/go/templates v1.2.0/go.mod h1:p+2hRvtjLUR3MW1NsoJe5Gqgr2eeH49QB6+s6ze00w0= github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231121210617-52ee94b830c2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= -github.com/onflow/flow/protobuf/go/flow v0.4.4 h1:lD1owoZGFgLcvdLZDmP0Kc4GOuQeSU3/d7hrujFzt6k= -github.com/onflow/flow/protobuf/go/flow v0.4.4/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= github.com/onflow/flow/protobuf/go/flow v0.4.5 h1:6o+pgYGqwXdEhqSJxu2BdnDXkOQVOkfGAb6IiXB+NPM= github.com/onflow/flow/protobuf/go/flow v0.4.5/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= -github.com/onflow/go-ethereum v1.13.4 h1:iNO86fm8RbBbhZ87ZulblInqCdHnAQVY8okBrNsTevc= -github.com/onflow/go-ethereum v1.13.4/go.mod h1:cE/gEUkAffhwbVmMJYz+t1dAfVNHNwZCgc3BWtZxBGY= github.com/onflow/go-ethereum v1.14.7 h1:gg3awYqI02e3AypRdpJKEvNTJ6kz/OhAqRti0h54Wlc= github.com/onflow/go-ethereum v1.14.7/go.mod h1:zV14QLrXyYu5ucvcwHUA0r6UaqveqbXaehAVQJlSW+I= github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU= @@ -2325,7 +2273,6 @@ github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/schollz/progressbar/v3 v3.13.1 h1:o8rySDYiQ59Mwzy2FELeHY5ZARXZTVJC7iHD6PEFUiE= github.com/schollz/progressbar/v3 v3.13.1/go.mod h1:xvrbki8kfT1fzWzBT/UZd9L6GA+jdL7HAgq2RFnO6fQ= github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= @@ -2346,8 +2293,9 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/slok/go-http-metrics v0.10.0 h1:rh0LaYEKza5eaYRGDXujKrOln57nHBi4TtVhmNEpbgM= github.com/slok/go-http-metrics v0.10.0/go.mod h1:lFqdaS4kWMfUKCSukjC47PdCeTk+hXDUVm8kLHRqJ38= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -2575,7 +2523,6 @@ golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -2598,8 +2545,6 @@ golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98y golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= -golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2674,8 +2619,8 @@ golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2734,7 +2679,6 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -2765,8 +2709,6 @@ golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20170207211851-4464e7848382/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -2826,8 +2768,6 @@ golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2903,7 +2843,6 @@ golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2963,8 +2902,6 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -2984,8 +2921,7 @@ golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= -golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= -golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -3103,8 +3039,7 @@ golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= -golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= -golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -3504,13 +3439,12 @@ gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= -gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= @@ -3527,7 +3461,6 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 79fd4c04886c460e40e000e619981e4a9f65ba4f Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Tue, 23 Jul 2024 16:42:14 +0200 Subject: [PATCH 03/55] update flow-go v0.36.3-0.20240723132958-6ce4c85fdbcb --- go.mod | 52 ++++++++++---------- go.sum | 147 ++++++++++++++++++++++++++------------------------------- 2 files changed, 94 insertions(+), 105 deletions(-) diff --git a/go.mod b/go.mod index 06f6f645..767661fa 100644 --- a/go.mod +++ b/go.mod @@ -4,22 +4,22 @@ go 1.22 require ( cloud.google.com/go/storage v1.36.0 - github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 + github.com/cockroachdb/pebble v1.1.1 github.com/goccy/go-json v0.10.2 github.com/google/uuid v1.6.0 github.com/onflow/atree v0.7.0-rc.2 - github.com/onflow/cadence v1.0.0-preview.36 - github.com/onflow/flow-go v0.36.0 - github.com/onflow/flow-go-sdk v1.0.0-preview.38 - github.com/onflow/flow/protobuf/go/flow v0.4.4 - github.com/onflow/go-ethereum v1.13.4 + github.com/onflow/cadence v1.0.0-preview.38 + github.com/onflow/flow-go v0.36.3-0.20240723132958-6ce4c85fdbcb + github.com/onflow/flow-go-sdk v1.0.0-preview.41 + github.com/onflow/flow/protobuf/go/flow v0.4.5 + github.com/onflow/go-ethereum v1.14.7 github.com/rs/cors v1.8.0 github.com/rs/zerolog v1.31.0 github.com/sethvargo/go-limiter v1.0.0 github.com/sethvargo/go-retry v0.2.3 github.com/stretchr/testify v1.9.0 golang.org/x/exp v0.0.0-20240119083558-1b970713d09a - golang.org/x/sync v0.6.0 + golang.org/x/sync v0.7.0 google.golang.org/api v0.162.0 google.golang.org/grpc v1.63.2 ) @@ -31,45 +31,47 @@ require ( cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/kms v1.15.7 // indirect github.com/DataDog/zstd v1.5.2 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect github.com/SaveTheRbtz/mph v0.1.1-0.20240117162131-4166ec7869bc // indirect github.com/StackExchange/wmi v1.2.1 // indirect - github.com/VictoriaMetrics/fastcache v1.12.1 // indirect + github.com/VictoriaMetrics/fastcache v1.12.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/redact v1.1.3 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/coreos/go-semver v0.3.0 // indirect - github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect + github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c // indirect + github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/deckarep/golang-set/v2 v2.1.0 // indirect + github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.0 // indirect github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/ef-ds/deque v1.0.4 // indirect - github.com/ethereum/c-kzg-4844 v0.4.0 // indirect + github.com/ethereum/c-kzg-4844 v1.0.0 // indirect github.com/ethereum/go-ethereum v1.13.10 // indirect + github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/frankban/quicktest v1.14.4 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/fxamacker/cbor/v2 v2.4.1-0.20230228173756-c0c9f774e40c // indirect github.com/fxamacker/circlehash v0.3.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect - github.com/getsentry/sentry-go v0.18.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-stack/stack v1.8.1 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.0 // indirect @@ -87,7 +89,7 @@ require ( github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.2.4 // indirect + github.com/holiman/uint256 v1.3.0 // indirect github.com/huandu/go-clone v1.6.0 // indirect github.com/huandu/go-clone/generic v1.7.2 // indirect github.com/huin/goupnp v1.3.0 // indirect @@ -131,8 +133,8 @@ require ( github.com/multiformats/go-varint v0.0.7 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/onflow/crypto v0.25.1 // indirect - github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0 // indirect - github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0 // indirect + github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 // indirect + github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 // indirect github.com/onflow/flow-ft/lib/go/contracts v1.0.0 // indirect github.com/onflow/flow-ft/lib/go/templates v1.0.0 // indirect github.com/onflow/flow-nft/lib/go/contracts v1.2.1 // indirect @@ -189,14 +191,12 @@ require ( go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.19.0 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/net v0.24.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.17.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect gonum.org/v1/gonum v0.14.0 // indirect google.golang.org/appengine v1.6.8 // indirect diff --git a/go.sum b/go.sum index 6a94b04d..f621153d 100644 --- a/go.sum +++ b/go.sum @@ -956,9 +956,7 @@ github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= @@ -968,8 +966,9 @@ github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXY github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= @@ -980,8 +979,9 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= -github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= +github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= +github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= github.com/aclements/go-gg v0.0.0-20170118225347-6dbb4e4fefb0/go.mod h1:55qNq4vcpkIuHowELi5C8e+1yUHtoLoOUR9QU5j7Tes= github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794/go.mod h1:7e+I0LQFUI9AXWxOfsQROs9xPhoJtbsyWcjJqDd4KPY= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= @@ -1076,8 +1076,9 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -1105,22 +1106,23 @@ github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM= github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= @@ -1149,8 +1151,11 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80/go.mod h1:gzbVz57IDJgQ9rLQwfSk696JGWof8ftznEL9GoAv3NI= -github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= +github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c h1:uQYC5Z1mdLRPrZhHjHxufI8+2UG/i25QG92j0Er9p6I= +github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= +github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= +github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= @@ -1168,8 +1173,9 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= -github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= +github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= @@ -1233,12 +1239,15 @@ github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7 github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA= +github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.10.26/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= github.com/ethereum/go-ethereum v1.13.5/go.mod h1:yMTu38GSuyxaYzQMViqNmQ1s3cE84abZexQmTgenWk0= github.com/ethereum/go-ethereum v1.13.10 h1:Ppdil79nN+Vc+mXfge0AuUgmKWuVv4eMqzoIVSdqZek= github.com/ethereum/go-ethereum v1.13.10/go.mod h1:sc48XYQxCzH3fG9BcrXCOOgQk2JfZzNAmIKnceogzsA= +github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4= +github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w= 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.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= @@ -1247,8 +1256,9 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= +github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= @@ -1270,9 +1280,8 @@ github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x github.com/gballet/go-verkle v0.0.0-20230607174250-df487255f46b/go.mod h1:CDncRYVRSDqwakm282WEkjfaAj1hxU/v5RXxk5nXOiI= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= @@ -1321,8 +1330,8 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= @@ -1332,7 +1341,6 @@ github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEK github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -1346,7 +1354,6 @@ github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -1354,9 +1361,8 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= +github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= @@ -1445,6 +1451,8 @@ github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -1516,7 +1524,6 @@ github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -1556,8 +1563,8 @@ github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZ github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= -github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= -github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= +github.com/holiman/uint256 v1.3.0 h1:4wdcm/tnd0xXdu7iS3ruNvxkWwrb4aeBQv19ayYn8F4= +github.com/holiman/uint256 v1.3.0/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= @@ -1570,7 +1577,6 @@ github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -1616,8 +1622,6 @@ github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= @@ -1632,7 +1636,6 @@ github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22 github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= @@ -1656,14 +1659,9 @@ github.com/k0kubun/pp v3.0.1+incompatible/go.mod h1:GWse8YhT0p8pT4ir3ZgBbfZild3t github.com/k0kubun/pp/v3 v3.2.0/go.mod h1:ODtJQbQcIRfAD3N+theGCV1m/CBxweERz2dapdz1EwA= github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kevinburke/go-bindata v3.23.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM= github.com/kevinburke/go-bindata v3.24.0+incompatible h1:qajFA3D0pH94OTLU4zcCCKCDgR+Zr2cZK/RPJHDdFoY= @@ -1677,7 +1675,6 @@ github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= @@ -1712,7 +1709,6 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= @@ -1750,7 +1746,6 @@ github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -1786,7 +1781,6 @@ github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvls github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.1.57 h1:Jzi7ApEIzwEPLHWRcafCN9LZSBbqQpxjt/wpgvg7wcM= github.com/miekg/dns v1.1.57/go.mod h1:uqRjCRUuEAA6qsOiJvDd+CFo/vW+y5WR6SNmHE55hZk= @@ -1840,11 +1834,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -1857,33 +1848,33 @@ github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs github.com/onflow/atree v0.7.0-rc.2 h1:mZmVrl/zPlfI44EjV3FdR2QwIqT8nz1sCONUBFcML/U= github.com/onflow/atree v0.7.0-rc.2/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM= github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= -github.com/onflow/cadence v1.0.0-preview.36 h1:mbxqoYSYiVX2Uo+Plrkmu29ezrShohlN+4Ltw0cfJxU= -github.com/onflow/cadence v1.0.0-preview.36/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0= +github.com/onflow/cadence v1.0.0-preview.38 h1:Ag3V1YCErma9ZF+eaNq602Vv2lBI3ScaMUcUOFj81GQ= +github.com/onflow/cadence v1.0.0-preview.38/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0= github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/crypto v0.25.1 h1:0txy2PKPMM873JbpxQNbJmuOJtD56bfs48RQfm0ts5A= github.com/onflow/crypto v0.25.1/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= -github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0 h1:cq3RfBr9TnTSnsGlUHMjMGZib24Horfb1XJqMpkN5ew= -github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= -github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0 h1:aMFJdB2CW+Dzm+AJ5QN6J1yWh+a0l2RxHN2/TtLaXUo= -github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= +github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 h1:q9tXLIALwQ76bO4bmSrhtTkyc2cZF4/gH11ix9E3F5k= +github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= +github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 h1:FfhMBAb78p6VAWkJ+iqdKLErGQVQgxk5w6DP5ZruWX8= +github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= github.com/onflow/flow-ft/lib/go/contracts v1.0.0 h1:mToacZ5NWqtlWwk/7RgIl/jeKB/Sy/tIXdw90yKHcV0= github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= github.com/onflow/flow-ft/lib/go/templates v1.0.0 h1:6cMS/lUJJ17HjKBfMO/eh0GGvnpElPgBXx7h5aoWJhs= github.com/onflow/flow-ft/lib/go/templates v1.0.0/go.mod h1:uQ8XFqmMK2jxyBSVrmyuwdWjTEb+6zGjRYotfDJ5pAE= -github.com/onflow/flow-go v0.36.0 h1:lWZkG9m9UhHr27CWBgUX56VcOI5yGMxy5I+waozqs1o= -github.com/onflow/flow-go v0.36.0/go.mod h1:O25T9vx2IaAAz8X7asQy1DAOUZyJYegnv6TFS0g05OA= +github.com/onflow/flow-go v0.36.3-0.20240723132958-6ce4c85fdbcb h1:s8Upr7xv/Tm2LMtc8FLH7ZZ/db5L/yhPU9MFGVpjr74= +github.com/onflow/flow-go v0.36.3-0.20240723132958-6ce4c85fdbcb/go.mod h1:NKttW0i0DlJYxddJoyR+E4sukr8MeCiNvtSadnZrXjY= github.com/onflow/flow-go-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo= -github.com/onflow/flow-go-sdk v1.0.0-preview.38 h1:vzTXhNkklnuxFaqhFeLPry+sud6LzhRMFFQveYJuXt4= -github.com/onflow/flow-go-sdk v1.0.0-preview.38/go.mod h1:SuSH+SB9jONwjhXrb402JM7HfDLAcXRABN1wF+iYAfw= +github.com/onflow/flow-go-sdk v1.0.0-preview.41 h1:pOUAIQdlWuc90tQzYixCXkqmnoorDgsFxTu2J1wlhHA= +github.com/onflow/flow-go-sdk v1.0.0-preview.41/go.mod h1:FyJiLluqK+sNo+ky9VU6HSwVkvhv5/fKH1sIKI1yrrI= github.com/onflow/flow-nft/lib/go/contracts v1.2.1 h1:woAAS5z651sDpi7ihAHll8NvRS9uFXIXkL6xR+bKFZY= github.com/onflow/flow-nft/lib/go/contracts v1.2.1/go.mod h1:2gpbza+uzs1k7x31hkpBPlggIRkI53Suo0n2AyA2HcE= github.com/onflow/flow-nft/lib/go/templates v1.2.0 h1:JSQyh9rg0RC+D1930BiRXN8lrtMs+ubVMK6aQPon6Yc= github.com/onflow/flow-nft/lib/go/templates v1.2.0/go.mod h1:p+2hRvtjLUR3MW1NsoJe5Gqgr2eeH49QB6+s6ze00w0= github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231121210617-52ee94b830c2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= -github.com/onflow/flow/protobuf/go/flow v0.4.4 h1:lD1owoZGFgLcvdLZDmP0Kc4GOuQeSU3/d7hrujFzt6k= -github.com/onflow/flow/protobuf/go/flow v0.4.4/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= -github.com/onflow/go-ethereum v1.13.4 h1:iNO86fm8RbBbhZ87ZulblInqCdHnAQVY8okBrNsTevc= -github.com/onflow/go-ethereum v1.13.4/go.mod h1:cE/gEUkAffhwbVmMJYz+t1dAfVNHNwZCgc3BWtZxBGY= +github.com/onflow/flow/protobuf/go/flow v0.4.5 h1:6o+pgYGqwXdEhqSJxu2BdnDXkOQVOkfGAb6IiXB+NPM= +github.com/onflow/flow/protobuf/go/flow v0.4.5/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= +github.com/onflow/go-ethereum v1.14.7 h1:gg3awYqI02e3AypRdpJKEvNTJ6kz/OhAqRti0h54Wlc= +github.com/onflow/go-ethereum v1.14.7/go.mod h1:zV14QLrXyYu5ucvcwHUA0r6UaqveqbXaehAVQJlSW+I= github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU= github.com/onflow/sdks v0.6.0-preview.1 h1:mb/cUezuqWEP1gFZNAgUI4boBltudv4nlfxke1KBp9k= github.com/onflow/sdks v0.6.0-preview.1/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU= @@ -2007,7 +1998,6 @@ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/schollz/progressbar/v3 v3.13.1 h1:o8rySDYiQ59Mwzy2FELeHY5ZARXZTVJC7iHD6PEFUiE= github.com/schollz/progressbar/v3 v3.13.1/go.mod h1:xvrbki8kfT1fzWzBT/UZd9L6GA+jdL7HAgq2RFnO6fQ= github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= @@ -2026,8 +2016,9 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/slok/go-http-metrics v0.10.0 h1:rh0LaYEKza5eaYRGDXujKrOln57nHBi4TtVhmNEpbgM= github.com/slok/go-http-metrics v0.10.0/go.mod h1:lFqdaS4kWMfUKCSukjC47PdCeTk+hXDUVm8kLHRqJ38= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -2225,7 +2216,6 @@ golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= @@ -2246,8 +2236,8 @@ golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98y golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= -golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2319,8 +2309,9 @@ golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2373,7 +2364,6 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -2404,8 +2394,8 @@ golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20170207211851-4464e7848382/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2463,8 +2453,8 @@ golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2533,7 +2523,6 @@ golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2590,9 +2579,10 @@ golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2610,8 +2600,8 @@ golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= -golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= -golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2724,8 +2714,8 @@ golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= -golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= -golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= +golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -3110,12 +3100,12 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= -gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= @@ -3131,7 +3121,6 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 27dab718a12f4b12f24bc16271c3d4f1e94e4e16 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:14:52 +0200 Subject: [PATCH 04/55] update new decode package --- models/block.go | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/models/block.go b/models/block.go index 8a331b16..79d0ee44 100644 --- a/models/block.go +++ b/models/block.go @@ -5,8 +5,8 @@ import ( "math/big" "github.com/onflow/cadence" + "github.com/onflow/flow-go/fvm/evm/events" "github.com/onflow/flow-go/fvm/evm/types" - "github.com/onflow/go-ethereum/common" ) var ( @@ -20,23 +20,17 @@ var ( // decodeBlock takes a cadence event that contains executed block payload and // decodes it into the Block type. func decodeBlock(event cadence.Event) (*types.Block, error) { - payload, err := types.DecodeBlockEventPayload(event) + payload, err := events.DecodeBlockEventPayload(event) if err != nil { return nil, fmt.Errorf("failed to cadence decode block [%s]: %w", event.String(), err) } - hashes := make([]common.Hash, len(payload.TransactionHashes)) - for i, h := range payload.TransactionHashes { - hashes[i] = common.HexToHash(string(h)) - } - return &types.Block{ - ParentBlockHash: common.HexToHash(payload.ParentBlockHash), - Height: payload.Height, - Timestamp: payload.Timestamp, - TotalSupply: payload.TotalSupply.Value, - ReceiptRoot: common.HexToHash(payload.ReceiptRoot), - TransactionHashes: hashes, - TotalGasUsed: payload.TotalGasUsed, + ParentBlockHash: payload.ParentBlockHash, + Height: payload.Height, + Timestamp: payload.Timestamp, + TotalSupply: payload.TotalSupply.Value, + ReceiptRoot: payload.ReceiptRoot, + TotalGasUsed: payload.TotalGasUsed, }, nil } From 5efa7315d5e65aed7ec7547a68a5dac2e496258a Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:22:19 +0200 Subject: [PATCH 05/55] update engine --- services/ingestion/engine.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/services/ingestion/engine.go b/services/ingestion/engine.go index 8395c921..9af63258 100644 --- a/services/ingestion/engine.go +++ b/services/ingestion/engine.go @@ -207,17 +207,13 @@ func (e *Engine) indexBlock( } blockHash, _ := block.Hash() - txHashes := make([]string, len(block.TransactionHashes)) - for i, t := range block.TransactionHashes { - txHashes[i] = t.Hex() - } e.log.Info(). Str("hash", blockHash.Hex()). Uint64("evm-height", block.Height). Uint64("cadence-height", cadenceHeight). Str("cadence-id", cadenceID.String()). Str("parent-hash", block.ParentBlockHash.String()). - Strs("tx-hashes", txHashes). + Str("tx-hashes-root", block.TransactionHashRoot.String()). Msg("new evm block executed event") return e.blocks.Store(cadenceHeight, cadenceID, block, batch) From 566bf0ea651f01a1425b0c16d94b56b6f98ad765 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:22:37 +0200 Subject: [PATCH 06/55] update package event --- models/events.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/models/events.go b/models/events.go index 5fd0be08..d7c80d57 100644 --- a/models/events.go +++ b/models/events.go @@ -5,6 +5,7 @@ import ( "github.com/onflow/cadence" "github.com/onflow/flow-go-sdk" + "github.com/onflow/flow-go/fvm/evm/events" "github.com/onflow/flow-go/fvm/evm/types" "golang.org/x/exp/slices" ) @@ -14,7 +15,7 @@ func isBlockExecutedEvent(event cadence.Event) bool { if event.EventType == nil { return false } - return strings.Contains(event.EventType.ID(), string(types.EventTypeBlockExecuted)) + return strings.Contains(event.EventType.ID(), string(events.EventTypeBlockExecuted)) } // isTransactionExecutedEvent checks whether the given event contains transaction executed data. @@ -22,7 +23,7 @@ func isTransactionExecutedEvent(event cadence.Event) bool { if event.EventType == nil { return false } - return strings.Contains(event.EventType.ID(), string(types.EventTypeTransactionExecuted)) + return strings.Contains(event.EventType.ID(), string(events.EventTypeTransactionExecuted)) } type CadenceEvents struct { From 4ffb0e546a44de03973893c722e3abcc60510aa6 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:38:13 +0200 Subject: [PATCH 07/55] refactor decoding of events into blocks and transactions --- models/events.go | 128 ++++++++++++++++++++++------------------------- 1 file changed, 59 insertions(+), 69 deletions(-) diff --git a/models/events.go b/models/events.go index d7c80d57..4cc95eec 100644 --- a/models/events.go +++ b/models/events.go @@ -1,13 +1,12 @@ package models import ( + "fmt" "strings" "github.com/onflow/cadence" "github.com/onflow/flow-go-sdk" "github.com/onflow/flow-go/fvm/evm/events" - "github.com/onflow/flow-go/fvm/evm/types" - "golang.org/x/exp/slices" ) // isBlockExecutedEvent checks whether the given event contains block executed data. @@ -26,90 +25,78 @@ func isTransactionExecutedEvent(event cadence.Event) bool { return strings.Contains(event.EventType.ID(), string(events.EventTypeTransactionExecuted)) } +// CadenceEvents contains Flow emitted events containing one or zero evm block executed event, +// and multiple or zero evm transaction events. type CadenceEvents struct { - events flow.BlockEvents + events flow.BlockEvents // Flow events for a specific flow block + block *Block // EVM block (at most one per Flow block) + transactions []Transaction // transactions in the EVM block + receipts []*StorageReceipt // receipts for transactions } -func NewCadenceEvents(events flow.BlockEvents) *CadenceEvents { - return &CadenceEvents{events: events} -} +// NewCadenceEvents decodes the events into evm types. +func NewCadenceEvents(events flow.BlockEvents) (*CadenceEvents, error) { + e := &CadenceEvents{events: events} + + // decode and cache block and transactions + for _, event := range events.Events { + val := event.Value + + if isBlockExecutedEvent(val) { + if e.block != nil { // safety check, we can only have 1 or 0 evm blocks per one flow block + return nil, fmt.Errorf("EVM block was already set for this Flow block, invalid event data") + } -// Blocks finds the block evm events and decodes it into the blocks slice, -// if no block events are found nil slice is returned. -// -// Return values: -// blocks, nil - if blocks are found -// nil, nil - if no block are found -// nil, err - unexpected error -func (c *CadenceEvents) Blocks() ([]*types.Block, error) { - blocks := make([]*types.Block, 0) - for _, e := range c.events.Events { - if isBlockExecutedEvent(e.Value) { - block, err := decodeBlock(e.Value) + block, err := decodeBlock(val) if err != nil { return nil, err } - blocks = append(blocks, block) - } - } - - // make sure order of heights is ordered, this is safety check - slices.SortFunc(blocks, func(a, b *types.Block) int { - return int(a.Height - b.Height) - }) - return blocks, nil -} - -// Transactions finds all the transactions evm events and decodes them into transaction slice, -// if no transactions is found nil is returned. -// -// Return values: -// []transaction, nil - if transactions are found -// nil, nil - if no transactions are found -// nil, err - unexpected error -func (c *CadenceEvents) Transactions() ([]Transaction, []*StorageReceipt, error) { - txs := make([]Transaction, 0) - rcps := make([]*StorageReceipt, 0) + e.block = block + continue + } - cumulativeGasUsed := uint64(0) - var lastReceipt *StorageReceipt - for _, e := range c.events.Events { - if isTransactionExecutedEvent(e.Value) { - tx, receipt, err := decodeTransactionEvent(e.Value) + if isTransactionExecutedEvent(val) { + tx, receipt, err := decodeTransactionEvent(val) if err != nil { - return nil, nil, err - } - - if lastReceipt != nil && lastReceipt.BlockNumber.Cmp(receipt.BlockNumber) == 0 { - cumulativeGasUsed += lastReceipt.GasUsed - receipt.CumulativeGasUsed = cumulativeGasUsed - } else { - cumulativeGasUsed = receipt.GasUsed - receipt.CumulativeGasUsed = cumulativeGasUsed + return nil, err } - lastReceipt = receipt - - txs = append(txs, tx) - rcps = append(rcps, receipt) + e.transactions = append(e.transactions, tx) + e.receipts = append(e.receipts, receipt) } } - return txs, rcps, nil + // calculate dynamic values + cumulativeGasUsed := uint64(0) + for i, rcp := range e.receipts { + // add transaction hashes to the block + e.block.TransactionHashes = append(e.block.TransactionHashes, rcp.TxHash) + // calculate cumulative gas used up to that point + cumulativeGasUsed += rcp.GasUsed + rcp.CumulativeGasUsed = cumulativeGasUsed + // set the transaction index + rcp.TransactionIndex = uint(i) + } + + return e, nil } -// Empty checks if there are any evm block or transactions events. -// If there are no evm block or transactions events this is a heartbeat -// event that is broadcast in intervals. -func (c *CadenceEvents) Empty() bool { - for _, e := range c.events.Events { - if isTransactionExecutedEvent(e.Value) || isBlockExecutedEvent(e.Value) { - return false - } - } +// Block evm block. If event doesn't contain EVM block the return value is nil. +func (c *CadenceEvents) Block() *Block { + return c.block +} + +// Transactions included in the EVM block, if event doesn't +// contain EVM transactions the return value is nil. +func (c *CadenceEvents) Transactions() []Transaction { + return c.transactions +} - return true +// Empty checks if there is an EVM block included in the events. +// If there are no evm block or transactions events this is a heartbeat event. +func (c *CadenceEvents) Empty() bool { + return c.block == nil } // CadenceHeight returns the Flow Cadence height at which the events @@ -135,8 +122,11 @@ type BlockEvents struct { } func NewBlockEvents(events flow.BlockEvents) BlockEvents { + blockEvents, err := NewCadenceEvents(events) + return BlockEvents{ - Events: NewCadenceEvents(events), + Events: blockEvents, + Err: err, } } From c1822b8249c6534f86e7f995b87d62cbc47139a0 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:38:25 +0200 Subject: [PATCH 08/55] create a custom block type --- models/block.go | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/models/block.go b/models/block.go index 79d0ee44..63d6b675 100644 --- a/models/block.go +++ b/models/block.go @@ -7,6 +7,7 @@ import ( "github.com/onflow/cadence" "github.com/onflow/flow-go/fvm/evm/events" "github.com/onflow/flow-go/fvm/evm/types" + gethCommon "github.com/onflow/go-ethereum/common" ) var ( @@ -17,20 +18,27 @@ var ( EarliestBlockNumber = big.NewInt(0) ) +type Block struct { + *types.Block + TransactionHashes []gethCommon.Hash +} + // decodeBlock takes a cadence event that contains executed block payload and // decodes it into the Block type. -func decodeBlock(event cadence.Event) (*types.Block, error) { +func decodeBlock(event cadence.Event) (*Block, error) { payload, err := events.DecodeBlockEventPayload(event) if err != nil { return nil, fmt.Errorf("failed to cadence decode block [%s]: %w", event.String(), err) } - return &types.Block{ - ParentBlockHash: payload.ParentBlockHash, - Height: payload.Height, - Timestamp: payload.Timestamp, - TotalSupply: payload.TotalSupply.Value, - ReceiptRoot: payload.ReceiptRoot, - TotalGasUsed: payload.TotalGasUsed, + return &Block{ + Block: &types.Block{ + ParentBlockHash: payload.ParentBlockHash, + Height: payload.Height, + Timestamp: payload.Timestamp, + TotalSupply: payload.TotalSupply.Value, + ReceiptRoot: payload.ReceiptRoot, + TotalGasUsed: payload.TotalGasUsed, + }, }, nil } From dbbcd47b21a7dc0bdb32cf57055d84553abc215e Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:38:42 +0200 Subject: [PATCH 09/55] update type changes in the transaction fields --- models/transaction.go | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/models/transaction.go b/models/transaction.go index 31b6e825..61b853c4 100644 --- a/models/transaction.go +++ b/models/transaction.go @@ -2,12 +2,12 @@ package models import ( "bytes" - "encoding/hex" "errors" "fmt" "math/big" "github.com/onflow/cadence" + "github.com/onflow/flow-go/fvm/evm/events" "github.com/onflow/flow-go/fvm/evm/types" "github.com/onflow/go-ethereum/common" "github.com/onflow/go-ethereum/core/txpool" @@ -185,36 +185,23 @@ func (tc TransactionCall) MarshalBinary() ([]byte, error) { // decodeTransactionEvent takes a cadence event for transaction executed // and decodes its payload into a Transaction interface and a StorageReceipt. // The concrete type will be either a TransactionCall or a DirectCall. -func decodeTransactionEvent( - event cadence.Event, -) (Transaction, *StorageReceipt, error) { - txEvent, err := types.DecodeTransactionEventPayload(event) +func decodeTransactionEvent(event cadence.Event) (Transaction, *StorageReceipt, error) { + txEvent, err := events.DecodeTransactionEventPayload(event) if err != nil { return nil, nil, fmt.Errorf("failed to Cadence decode transaction event [%s]: %w", event.String(), err) } - encodedTx, err := hex.DecodeString(txEvent.Payload) - if err != nil { - return nil, nil, fmt.Errorf("failed to hex decode transaction payload [%s]: %w", txEvent.Payload, err) - } - gethReceipt := &gethTypes.Receipt{ BlockNumber: big.NewInt(int64(txEvent.BlockHeight)), Type: txEvent.TransactionType, - TxHash: common.HexToHash(txEvent.Hash), + TxHash: txEvent.Hash, ContractAddress: common.HexToAddress(txEvent.ContractAddress), GasUsed: txEvent.GasConsumed, TransactionIndex: uint(txEvent.Index), - BlockHash: common.HexToHash(txEvent.BlockHash), - } - - encLogs, err := hex.DecodeString(txEvent.Logs) - if err != nil { - return nil, nil, fmt.Errorf("failed to hex decode logs: %w", err) } - if len(encLogs) > 0 { - err = rlp.Decode(bytes.NewReader(encLogs), &gethReceipt.Logs) + if len(txEvent.Logs) > 0 { + err = rlp.Decode(bytes.NewReader(txEvent.Logs), &gethReceipt.Logs) if err != nil { return nil, nil, fmt.Errorf("failed to rlp decode logs: %w", err) } @@ -238,10 +225,7 @@ func decodeTransactionEvent( var revertReason []byte if txEvent.ErrorCode == uint16(types.ExecutionErrCodeExecutionReverted) { - revertReason, err = hex.DecodeString(txEvent.ReturnedData) - if err != nil { - return nil, nil, fmt.Errorf("failed to hex-decode transaction return data [%s]: %w", txEvent.ReturnedData, err) - } + revertReason = txEvent.ReturnedData } receipt := NewStorageReceipt(gethReceipt, revertReason) @@ -250,17 +234,17 @@ func decodeTransactionEvent( // check if the transaction payload is actually from a direct call, // which is a special state transition in Flow EVM. if txEvent.TransactionType == types.DirectCallTxType { - directCall, err := types.DirectCallFromEncoded(encodedTx) + directCall, err := types.DirectCallFromEncoded(txEvent.Payload) if err != nil { - return nil, nil, fmt.Errorf("failed to RLP-decode direct call [%x]: %w", encodedTx, err) + return nil, nil, fmt.Errorf("failed to RLP-decode direct call [%x]: %w", txEvent.Payload, err) } evmHeight := receipt.BlockNumber.Uint64() tx = DirectCall{DirectCall: directCall, blockHeight: evmHeight} } else { gethTx := &gethTypes.Transaction{} - if err := gethTx.UnmarshalBinary(encodedTx); err != nil { - return nil, nil, fmt.Errorf("failed to RLP-decode transaction [%x]: %w", encodedTx, err) + if err := gethTx.UnmarshalBinary(txEvent.Payload); err != nil { + return nil, nil, fmt.Errorf("failed to RLP-decode transaction [%x]: %w", txEvent.Payload, err) } tx = TransactionCall{Transaction: gethTx} } From 435341b5e4b9f58c45d55bfa08e53f39a0759c37 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:54:20 +0200 Subject: [PATCH 10/55] update engine with block changes --- services/ingestion/engine.go | 41 ++++++++++++++---------------------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/services/ingestion/engine.go b/services/ingestion/engine.go index 9af63258..31ea759f 100644 --- a/services/ingestion/engine.go +++ b/services/ingestion/engine.go @@ -142,29 +142,22 @@ func (e *Engine) processEvents(events *models.CadenceEvents) error { batch := e.store.NewBatch() defer batch.Close() - // we first index evm blocks only then transactions if any present - blocks, err := events.Blocks() + // we first index the block + err := e.indexBlock( + events.CadenceHeight(), + events.CadenceBlockID(), + events.Block(), + batch, + ) if err != nil { - return err - } - for _, block := range blocks { - err := e.indexBlock( - events.CadenceHeight(), - events.CadenceBlockID(), - block, - batch, - ) - if err != nil { - return fmt.Errorf("failed to index block %d event: %w", block.Height, err) - } + return fmt.Errorf("failed to index block %d event: %w", events.Block().Height, err) } - txs, receipts, err := events.Transactions() - if err != nil { - return err - } - for i, tx := range txs { - if err := e.indexTransaction(tx, receipts[i], batch); err != nil { + for i, tx := range events.Transactions() { + receipt := events.Receipts()[i] + + err := e.indexTransaction(tx, receipt, batch) + if err != nil { return fmt.Errorf("failed to index transaction %s event: %w", tx.Hash().String(), err) } } @@ -173,12 +166,10 @@ func (e *Engine) processEvents(events *models.CadenceEvents) error { return fmt.Errorf("failed to commit indexed data for Cadence block %d: %w", events.CadenceHeight(), err) } - // emit events for each block, transaction and logs, only after we successfully commit the data - for _, b := range blocks { - e.blocksPublisher.Publish(b) - } + // emit block event and logs, only after we successfully commit the data + e.blocksPublisher.Publish(events.Block()) - for _, r := range receipts { + for _, r := range events.Receipts() { if len(r.Logs) > 0 { e.logsPublisher.Publish(r.Logs) } From 36e44d1fa5479e035833938770b2e078a68faa67 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:54:29 +0200 Subject: [PATCH 11/55] add safety check for nil block with txs --- models/events.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/models/events.go b/models/events.go index 4cc95eec..0e317ddb 100644 --- a/models/events.go +++ b/models/events.go @@ -67,6 +67,11 @@ func NewCadenceEvents(events flow.BlockEvents) (*CadenceEvents, error) { } } + // safety check, we can't have an empty block with transactions + if e.block == nil && len(e.transactions) > 0 { + return nil, fmt.Errorf("EVM block can not be nil if transactions are present, invalid event data") + } + // calculate dynamic values cumulativeGasUsed := uint64(0) for i, rcp := range e.receipts { @@ -93,6 +98,12 @@ func (c *CadenceEvents) Transactions() []Transaction { return c.transactions } +// Receipts included in the EVM block, if event doesn't +// contain EVM transactions the return value is nil. +func (c *CadenceEvents) Receipts() []*StorageReceipt { + return c.receipts +} + // Empty checks if there is an EVM block included in the events. // If there are no evm block or transactions events this is a heartbeat event. func (c *CadenceEvents) Empty() bool { From 5234d3391ae5966560c26b54edb3cf7688f08d0b Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:56:47 +0200 Subject: [PATCH 12/55] update storage block type --- storage/pebble/blocks.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/storage/pebble/blocks.go b/storage/pebble/blocks.go index bb45eb1f..16568c4f 100644 --- a/storage/pebble/blocks.go +++ b/storage/pebble/blocks.go @@ -12,6 +12,7 @@ import ( "github.com/onflow/flow-go/fvm/evm/types" "github.com/onflow/go-ethereum/common" + "github.com/onflow/flow-evm-gateway/models" "github.com/onflow/flow-evm-gateway/storage" errs "github.com/onflow/flow-evm-gateway/storage/errors" ) @@ -33,7 +34,7 @@ func NewBlocks(store *Storage) *Blocks { func (b *Blocks) Store( cadenceHeight uint64, cadenceID flow.Identifier, - block *types.Block, + block *models.Block, batch *pebble.Batch, ) error { b.mux.Lock() @@ -197,7 +198,7 @@ func (b *Blocks) InitHeights(cadenceHeight uint64, cadenceID flow.Identifier) er } // we store genesis block because it isn't emitted over the network - if err := b.Store(cadenceHeight, cadenceID, types.GenesisBlock, nil); err != nil { + if err := b.Store(cadenceHeight, cadenceID, models.GenesisBlock, nil); err != nil { return fmt.Errorf("faield to set init genesis block: %w", err) } From db7d44ccf898bbcbc5daadee4e3c48cbe1d4f69d Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:56:58 +0200 Subject: [PATCH 13/55] update index block type --- services/ingestion/engine.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/ingestion/engine.go b/services/ingestion/engine.go index 31ea759f..8c199522 100644 --- a/services/ingestion/engine.go +++ b/services/ingestion/engine.go @@ -6,7 +6,6 @@ import ( pebbleDB "github.com/cockroachdb/pebble" "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go/fvm/evm/types" "github.com/rs/zerolog" "github.com/onflow/flow-evm-gateway/models" @@ -181,7 +180,7 @@ func (e *Engine) processEvents(events *models.CadenceEvents) error { func (e *Engine) indexBlock( cadenceHeight uint64, cadenceID flow.Identifier, - block *types.Block, + block *models.Block, batch *pebbleDB.Batch, ) error { if block == nil { // safety check shouldn't happen From 832aa39d36368f2e3f1a843ae8295c3c4d74d51a Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:57:04 +0200 Subject: [PATCH 14/55] add genesis block --- models/block.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/block.go b/models/block.go index 63d6b675..9b5943bc 100644 --- a/models/block.go +++ b/models/block.go @@ -18,6 +18,8 @@ var ( EarliestBlockNumber = big.NewInt(0) ) +var GenesisBlock = &Block{Block: types.GenesisBlock} + type Block struct { *types.Block TransactionHashes []gethCommon.Hash From 503af8eda6feb01ae91e7e254b7e67b470f97d99 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:57:42 +0200 Subject: [PATCH 15/55] update interfaces --- storage/index.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/storage/index.go b/storage/index.go index ab7b2307..a04b7f08 100644 --- a/storage/index.go +++ b/storage/index.go @@ -6,7 +6,6 @@ import ( "github.com/cockroachdb/pebble" "github.com/goccy/go-json" "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go/fvm/evm/types" "github.com/onflow/go-ethereum/common" gethTypes "github.com/onflow/go-ethereum/core/types" @@ -18,17 +17,17 @@ type BlockIndexer interface { // Batch is required to batch multiple indexer operations, skipped if nil. // Expected errors: // - errors.Duplicate if the block already exists - Store(cadenceHeight uint64, cadenceID flow.Identifier, block *types.Block, batch *pebble.Batch) error + Store(cadenceHeight uint64, cadenceID flow.Identifier, block *models.Block, batch *pebble.Batch) error // GetByHeight returns an EVM block stored by EVM height. // Expected errors: // - errors.NotFound if the block is not found - GetByHeight(height uint64) (*types.Block, error) + GetByHeight(height uint64) (*models.Block, error) // GetByID returns an EVM block stored by ID. // Expected errors: // - errors.NotFound if the block is not found - GetByID(ID common.Hash) (*types.Block, error) + GetByID(ID common.Hash) (*models.Block, error) // GetHeightByID returns the EVM block height for the given ID. // Expected errors: From f66bb1f78687ca3a88e76c214cea508b2bd18a80 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 13:13:44 +0200 Subject: [PATCH 16/55] change block type implementation --- models/block.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/models/block.go b/models/block.go index 9b5943bc..5a4ad32b 100644 --- a/models/block.go +++ b/models/block.go @@ -8,6 +8,7 @@ import ( "github.com/onflow/flow-go/fvm/evm/events" "github.com/onflow/flow-go/fvm/evm/types" gethCommon "github.com/onflow/go-ethereum/common" + "github.com/onflow/go-ethereum/rlp" ) var ( @@ -20,14 +21,23 @@ var ( var GenesisBlock = &Block{Block: types.GenesisBlock} +func NewBlockFromBytes(data []byte) (*Block, error) { + var b *Block + return b, rlp.DecodeBytes(data, b) +} + type Block struct { *types.Block TransactionHashes []gethCommon.Hash } -// decodeBlock takes a cadence event that contains executed block payload and +func (b *Block) ToBytes() ([]byte, error) { + return rlp.EncodeToBytes(b) +} + +// decodeBlockEvent takes a cadence event that contains executed block payload and // decodes it into the Block type. -func decodeBlock(event cadence.Event) (*Block, error) { +func decodeBlockEvent(event cadence.Event) (*Block, error) { payload, err := events.DecodeBlockEventPayload(event) if err != nil { return nil, fmt.Errorf("failed to cadence decode block [%s]: %w", event.String(), err) From a240623cbcc8ba86a70f6afe7cdf50c52c97c9fa Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 13:13:54 +0200 Subject: [PATCH 17/55] use evm gw block type --- models/block_test.go | 2 +- models/events.go | 15 ++++++++++++++- models/transaction.go | 8 -------- storage/pebble/blocks.go | 9 ++++----- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/models/block_test.go b/models/block_test.go index 756efcc6..338485a9 100644 --- a/models/block_test.go +++ b/models/block_test.go @@ -27,7 +27,7 @@ func Test_DecodeBlockExecutedEvent(t *testing.T) { encEv, err := ev.Payload.ToCadence(location) require.NoError(t, err) - decBlock, err := decodeBlock(encEv) + decBlock, err := decodeBlockEvent(encEv) require.NoError(t, err) assert.Equal(t, block, decBlock) } diff --git a/models/events.go b/models/events.go index 0e317ddb..0d233352 100644 --- a/models/events.go +++ b/models/events.go @@ -47,7 +47,7 @@ func NewCadenceEvents(events flow.BlockEvents) (*CadenceEvents, error) { return nil, fmt.Errorf("EVM block was already set for this Flow block, invalid event data") } - block, err := decodeBlock(val) + block, err := decodeBlockEvent(val) if err != nil { return nil, err } @@ -74,6 +74,11 @@ func NewCadenceEvents(events flow.BlockEvents) (*CadenceEvents, error) { // calculate dynamic values cumulativeGasUsed := uint64(0) + blockHash, err := e.block.Hash() + if err != nil { + return nil, err + } + for i, rcp := range e.receipts { // add transaction hashes to the block e.block.TransactionHashes = append(e.block.TransactionHashes, rcp.TxHash) @@ -82,6 +87,14 @@ func NewCadenceEvents(events flow.BlockEvents) (*CadenceEvents, error) { rcp.CumulativeGasUsed = cumulativeGasUsed // set the transaction index rcp.TransactionIndex = uint(i) + // set calculate block hash + rcp.BlockHash = blockHash + // dynamically add missing log fields + for _, l := range rcp.Logs { + l.TxHash = rcp.TxHash + l.BlockNumber = rcp.BlockNumber.Uint64() + l.Index = rcp.TransactionIndex + } } return e, nil diff --git a/models/transaction.go b/models/transaction.go index 61b853c4..1642f79a 100644 --- a/models/transaction.go +++ b/models/transaction.go @@ -205,14 +205,6 @@ func decodeTransactionEvent(event cadence.Event) (Transaction, *StorageReceipt, if err != nil { return nil, nil, fmt.Errorf("failed to rlp decode logs: %w", err) } - - // dynamically add missing log fields - for _, l := range gethReceipt.Logs { - l.BlockHash = gethReceipt.BlockHash - l.TxHash = gethReceipt.TxHash - l.BlockNumber = gethReceipt.BlockNumber.Uint64() - l.Index = gethReceipt.TransactionIndex - } } if txEvent.ErrorCode == uint16(types.ErrCodeNoError) { diff --git a/storage/pebble/blocks.go b/storage/pebble/blocks.go index 16568c4f..fef3643d 100644 --- a/storage/pebble/blocks.go +++ b/storage/pebble/blocks.go @@ -9,7 +9,6 @@ import ( "github.com/cockroachdb/pebble" "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go/fvm/evm/types" "github.com/onflow/go-ethereum/common" "github.com/onflow/flow-evm-gateway/models" @@ -85,7 +84,7 @@ func (b *Blocks) Store( return nil } -func (b *Blocks) GetByHeight(height uint64) (*types.Block, error) { +func (b *Blocks) GetByHeight(height uint64) (*models.Block, error) { b.mux.RLock() defer b.mux.RUnlock() @@ -107,7 +106,7 @@ func (b *Blocks) GetByHeight(height uint64) (*types.Block, error) { return blk, nil } -func (b *Blocks) GetByID(ID common.Hash) (*types.Block, error) { +func (b *Blocks) GetByID(ID common.Hash) (*models.Block, error) { b.mux.RLock() defer b.mux.RUnlock() @@ -229,11 +228,11 @@ func (b *Blocks) GetCadenceID(evmHeight uint64) (flow.Identifier, error) { return flow.BytesToID(val), nil } -func (b *Blocks) getBlock(keyCode byte, key []byte) (*types.Block, error) { +func (b *Blocks) getBlock(keyCode byte, key []byte) (*models.Block, error) { data, err := b.store.get(keyCode, key) if err != nil { return nil, fmt.Errorf("failed to get block: %w", err) } - return types.NewBlockFromBytes(data) + return models.NewBlockFromBytes(data) } From 413d3b76437713d69c609c7aa2bd0c6ee9d022ba Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 13:18:47 +0200 Subject: [PATCH 18/55] refactor new cadence event --- models/events.go | 61 ++++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/models/events.go b/models/events.go index 0d233352..3fefe930 100644 --- a/models/events.go +++ b/models/events.go @@ -36,6 +36,42 @@ type CadenceEvents struct { // NewCadenceEvents decodes the events into evm types. func NewCadenceEvents(events flow.BlockEvents) (*CadenceEvents, error) { + e, err := decodeCadenceEvents(events) + if err != nil { + return nil, err + } + + // calculate dynamic values + cumulativeGasUsed := uint64(0) + blockHash, err := e.block.Hash() + if err != nil { + return nil, err + } + + for i, rcp := range e.receipts { + // add transaction hashes to the block + e.block.TransactionHashes = append(e.block.TransactionHashes, rcp.TxHash) + // calculate cumulative gas used up to that point + cumulativeGasUsed += rcp.GasUsed + rcp.CumulativeGasUsed = cumulativeGasUsed + // set the transaction index + rcp.TransactionIndex = uint(i) + // set calculate block hash + rcp.BlockHash = blockHash + // dynamically add missing log fields + for _, l := range rcp.Logs { + l.TxHash = rcp.TxHash + l.BlockNumber = rcp.BlockNumber.Uint64() + l.Index = rcp.TransactionIndex + } + } + + return e, nil +} + +// decodeCadenceEvents accepts Flow Cadence event and decodes it into CadenceEvents +// collection. It also performs safety checks on the provided event data. +func decodeCadenceEvents(events flow.BlockEvents) (*CadenceEvents, error) { e := &CadenceEvents{events: events} // decode and cache block and transactions @@ -72,31 +108,6 @@ func NewCadenceEvents(events flow.BlockEvents) (*CadenceEvents, error) { return nil, fmt.Errorf("EVM block can not be nil if transactions are present, invalid event data") } - // calculate dynamic values - cumulativeGasUsed := uint64(0) - blockHash, err := e.block.Hash() - if err != nil { - return nil, err - } - - for i, rcp := range e.receipts { - // add transaction hashes to the block - e.block.TransactionHashes = append(e.block.TransactionHashes, rcp.TxHash) - // calculate cumulative gas used up to that point - cumulativeGasUsed += rcp.GasUsed - rcp.CumulativeGasUsed = cumulativeGasUsed - // set the transaction index - rcp.TransactionIndex = uint(i) - // set calculate block hash - rcp.BlockHash = blockHash - // dynamically add missing log fields - for _, l := range rcp.Logs { - l.TxHash = rcp.TxHash - l.BlockNumber = rcp.BlockNumber.Uint64() - l.Index = rcp.TransactionIndex - } - } - return e, nil } From 945f2ab8d9ef795a2f47623cb7a768ff4a970642 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 14:30:32 +0200 Subject: [PATCH 19/55] update tests with api change --- models/block_test.go | 21 ++++++++-------- models/events.go | 5 ++++ models/events_test.go | 51 ++++++++++++++------------------------ models/transaction_test.go | 12 ++++----- 4 files changed, 39 insertions(+), 50 deletions(-) diff --git a/models/block_test.go b/models/block_test.go index 338485a9..bdf4202a 100644 --- a/models/block_test.go +++ b/models/block_test.go @@ -4,8 +4,9 @@ import ( "math/big" "testing" - "github.com/onflow/cadence/runtime/common" + "github.com/onflow/flow-go/fvm/evm/events" "github.com/onflow/flow-go/fvm/evm/types" + flowGo "github.com/onflow/flow-go/model/flow" gethCommon "github.com/onflow/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -13,18 +14,16 @@ import ( func Test_DecodeBlockExecutedEvent(t *testing.T) { block := &types.Block{ - ParentBlockHash: gethCommon.HexToHash("0x1"), - Height: 100, - TotalSupply: big.NewInt(100), - ReceiptRoot: gethCommon.HexToHash("0x2"), - TransactionHashes: []gethCommon.Hash{ - gethCommon.HexToHash("0xf1"), - }, + ParentBlockHash: gethCommon.HexToHash("0x1"), + Height: 100, + TotalSupply: big.NewInt(100), + ReceiptRoot: gethCommon.HexToHash("0x2"), + TransactionHashRoot: gethCommon.HexToHash("0x3"), + TotalGasUsed: uint64(30), } - ev := types.NewBlockEvent(block) + ev := events.NewBlockEvent(block) - location := common.NewAddressLocation(nil, common.Address{0x1}, string(types.EventTypeBlockExecuted)) - encEv, err := ev.Payload.ToCadence(location) + encEv, err := ev.Payload.ToCadence(flowGo.Previewnet) require.NoError(t, err) decBlock, err := decodeBlockEvent(encEv) diff --git a/models/events.go b/models/events.go index 3fefe930..797fd215 100644 --- a/models/events.go +++ b/models/events.go @@ -41,6 +41,11 @@ func NewCadenceEvents(events flow.BlockEvents) (*CadenceEvents, error) { return nil, err } + // if cadence event is empty don't calculate any dynamic values + if e.Empty() { + return e, nil + } + // calculate dynamic values cumulativeGasUsed := uint64(0) blockHash, err := e.block.Hash() diff --git a/models/events_test.go b/models/events_test.go index da950f82..9eb90b05 100644 --- a/models/events_test.go +++ b/models/events_test.go @@ -5,82 +5,69 @@ import ( "testing" "github.com/onflow/cadence" - "github.com/onflow/cadence/runtime/common" "github.com/onflow/flow-go-sdk" + "github.com/onflow/flow-go/fvm/evm/events" "github.com/onflow/flow-go/fvm/evm/types" + flowGo "github.com/onflow/flow-go/model/flow" gethCommon "github.com/onflow/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestCadenceEvents_Block(t *testing.T) { - invalid := cadence.String("invalid") b0, e0, err := newBlock(0) require.NoError(t, err) - b1, e1, err := newBlock(1) - require.NoError(t, err) - - b2, e2, err := newBlock(2) - require.NoError(t, err) - tests := []struct { name string events flow.BlockEvents - blocks []*types.Block + block *Block err error }{ { name: "BlockExecutedEventExists", events: flow.BlockEvents{Events: []flow.Event{e0}}, - blocks: []*types.Block{b0}, + block: b0, }, { name: "BlockExecutedEventEmpty", events: flow.BlockEvents{Events: []flow.Event{}}, - blocks: []*types.Block{}, + block: nil, }, { name: "BlockExecutedNotFound", events: flow.BlockEvents{Events: []flow.Event{{ Type: e0.Type, Value: cadence.NewEvent([]cadence.Value{invalid}), }}}, - blocks: []*types.Block{}, - }, { - name: "BlockExecutedOutOfOrder", - events: flow.BlockEvents{Events: []flow.Event{e0, e2, e1}}, - blocks: []*types.Block{b0, b1, b2}, + block: nil, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - c := NewCadenceEvents(tt.events) - blocks, err := c.Blocks() + e, err := NewCadenceEvents(tt.events) require.NoError(t, err) - if tt.blocks != nil { - for i, ttb := range tt.blocks { - ttHash, err := ttb.Hash() - require.NoError(t, err) - hash, err := blocks[i].Hash() - require.NoError(t, err) - assert.Equal(t, ttHash, hash) - } + if tt.block != nil { + ttHash, err := tt.block.Hash() + require.NoError(t, err) + hash, err := e.Block().Hash() + require.NoError(t, err) + assert.Equal(t, ttHash, hash) } else { - assert.Nil(t, blocks) + assert.Nil(t, e.Block()) } }) } } -func newBlock(height uint64) (*types.Block, flow.Event, error) { - evmBlock := types.NewBlock(gethCommon.HexToHash("0x01"), height, uint64(1337), big.NewInt(100), gethCommon.HexToHash("0x02"), nil) - ev := types.NewBlockEvent(evmBlock) +func newBlock(height uint64) (*Block, flow.Event, error) { + gethBlock := types.NewBlock(gethCommon.HexToHash("0x01"), height, uint64(1337), big.NewInt(100)) + evmBlock := &Block{Block: gethBlock} + ev := events.NewBlockEvent(gethBlock) - location := common.NewAddressLocation(nil, common.Address{0x1}, string(types.EventTypeBlockExecuted)) - cadenceEvent, err := ev.Payload.ToCadence(location) + cadenceEvent, err := ev.Payload.ToCadence(flowGo.Previewnet) if err != nil { return nil, flow.Event{}, err } diff --git a/models/transaction_test.go b/models/transaction_test.go index d2337e31..5559f746 100644 --- a/models/transaction_test.go +++ b/models/transaction_test.go @@ -7,15 +7,15 @@ import ( "encoding/hex" "fmt" "math/big" + "math/rand" "testing" "time" - "math/rand" - "github.com/onflow/cadence" - "github.com/onflow/cadence/runtime/common" "github.com/onflow/flow-go/fvm/evm/emulator" + "github.com/onflow/flow-go/fvm/evm/events" "github.com/onflow/flow-go/fvm/evm/types" + flowGo "github.com/onflow/flow-go/model/flow" gethCommon "github.com/onflow/go-ethereum/common" "github.com/onflow/go-ethereum/core" "github.com/onflow/go-ethereum/core/txpool" @@ -70,15 +70,13 @@ func createTestEvent(t *testing.T, txBinary string) (cadence.Event, *types.Resul TxHash: txHash, } - ev := types.NewTransactionEvent( + ev := events.NewTransactionEvent( res, txEncoded, 1, - gethCommon.HexToHash("0x1"), ) - location := common.NewAddressLocation(nil, common.Address{0x1}, string(types.EventTypeBlockExecuted)) - cdcEv, err := ev.Payload.ToCadence(location) + cdcEv, err := ev.Payload.ToCadence(flowGo.Previewnet) require.NoError(t, err) return cdcEv, res From 5e6bc5168bd6614e6ae554c4fa1a2995709c32a8 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:11:48 +0200 Subject: [PATCH 20/55] add backward compatible test --- models/block_test.go | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/models/block_test.go b/models/block_test.go index bdf4202a..d492b5af 100644 --- a/models/block_test.go +++ b/models/block_test.go @@ -13,7 +13,7 @@ import ( ) func Test_DecodeBlockExecutedEvent(t *testing.T) { - block := &types.Block{ + gethBlock := &types.Block{ ParentBlockHash: gethCommon.HexToHash("0x1"), Height: 100, TotalSupply: big.NewInt(100), @@ -21,12 +21,42 @@ func Test_DecodeBlockExecutedEvent(t *testing.T) { TransactionHashRoot: gethCommon.HexToHash("0x3"), TotalGasUsed: uint64(30), } - ev := events.NewBlockEvent(block) + block := &Block{Block: gethBlock} + ev := events.NewBlockEvent(gethBlock) encEv, err := ev.Payload.ToCadence(flowGo.Previewnet) require.NoError(t, err) decBlock, err := decodeBlockEvent(encEv) require.NoError(t, err) - assert.Equal(t, block, decBlock) + + assert.Equal(t, block.Block, gethBlock) + h1, err := block.Hash() + require.NoError(t, err) + h2, err := decBlock.Hash() + require.NoError(t, err) + assert.Equal(t, h1, h2) +} + +func Test_Hash(t *testing.T) { + // we fix the hash calculation for bellow block, so we can detect + // any breaking changes in hash calculation or block structure + // coming from changes in EVM Core (flow-go), we should be aware of changes + // and this test makes sure we are, if changes occur it means they break backward + // compatibility when calculating hashes for older blocks. + const hash = "0x416d070745756c79d23d3bda31020ece8326ac7e862c2f5440c9a0661edd3769" + + gethBlock := &types.Block{ + ParentBlockHash: gethCommon.HexToHash("0x1"), + Height: 100, + TotalSupply: big.NewInt(100), + ReceiptRoot: gethCommon.HexToHash("0x2"), + TransactionHashRoot: gethCommon.HexToHash("0x3"), + TotalGasUsed: uint64(30), + } + block := &Block{Block: gethBlock} + + h, err := block.Hash() + require.NoError(t, err) + require.Equal(t, hash, h.String()) } From 6c138788d05c6acb43d7a3e56cd9cec59718aba4 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:29:42 +0200 Subject: [PATCH 21/55] add missing field --- models/block.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/models/block.go b/models/block.go index 5a4ad32b..1133df28 100644 --- a/models/block.go +++ b/models/block.go @@ -45,12 +45,13 @@ func decodeBlockEvent(event cadence.Event) (*Block, error) { return &Block{ Block: &types.Block{ - ParentBlockHash: payload.ParentBlockHash, - Height: payload.Height, - Timestamp: payload.Timestamp, - TotalSupply: payload.TotalSupply.Value, - ReceiptRoot: payload.ReceiptRoot, - TotalGasUsed: payload.TotalGasUsed, + ParentBlockHash: payload.ParentBlockHash, + Height: payload.Height, + Timestamp: payload.Timestamp, + TotalSupply: payload.TotalSupply.Value, + ReceiptRoot: payload.ReceiptRoot, + TransactionHashRoot: payload.TransactionHashRoot, + TotalGasUsed: payload.TotalGasUsed, }, }, nil } From 8841ed4afca9a198935af8208440800ad82daeef Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:30:16 +0200 Subject: [PATCH 22/55] compare block decode test fix --- models/block_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/block_test.go b/models/block_test.go index d492b5af..79082ef7 100644 --- a/models/block_test.go +++ b/models/block_test.go @@ -30,7 +30,7 @@ func Test_DecodeBlockExecutedEvent(t *testing.T) { decBlock, err := decodeBlockEvent(encEv) require.NoError(t, err) - assert.Equal(t, block.Block, gethBlock) + assert.Equal(t, decBlock, block) h1, err := block.Hash() require.NoError(t, err) h2, err := decBlock.Hash() From 202e9e3bc02878816c647ea99bfa03da3f7970d5 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:31:54 +0200 Subject: [PATCH 23/55] fix index test suite --- storage/index_testsuite.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/storage/index_testsuite.go b/storage/index_testsuite.go index 4337ae28..a3e14243 100644 --- a/storage/index_testsuite.go +++ b/storage/index_testsuite.go @@ -5,10 +5,8 @@ import ( "math/big" "github.com/goccy/go-json" - evmEmulator "github.com/onflow/flow-go/fvm/evm/emulator" - goTypes "github.com/onflow/flow-go/fvm/evm/types" - "github.com/onflow/flow-go-sdk" + evmEmulator "github.com/onflow/flow-go/fvm/evm/emulator" "github.com/onflow/go-ethereum/common" "github.com/onflow/go-ethereum/core/types" "github.com/onflow/go-ethereum/crypto" @@ -108,7 +106,7 @@ func (b *BlockTestSuite) TestHeights() { b.Run("get height by ID", func() { evmHeights := []uint64{10, 11, 12, 13} cadenceIDs := []flow.Identifier{{0x01}, {0x02}, {0x03}, {0x04}} - blocks := make([]*goTypes.Block, 4) + blocks := make([]*models.Block, 4) for i, evmHeight := range evmHeights { blocks[i] = mocks.NewBlock(evmHeight) From 5ba2d80ff31c70e0865655b6f2098e15490110b2 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:32:01 +0200 Subject: [PATCH 24/55] update mock block --- storage/mocks/mocks.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/storage/mocks/mocks.go b/storage/mocks/mocks.go index 9be549ef..d6b09d70 100644 --- a/storage/mocks/mocks.go +++ b/storage/mocks/mocks.go @@ -11,17 +11,19 @@ import ( "github.com/onflow/flow-evm-gateway/models" ) -func NewBlock(height uint64) *types.Block { +func NewBlock(height uint64) *models.Block { parent := common.HexToHash(fmt.Sprintf("0x0%d", height-1)) if height == 0 { parent = common.Hash{} } - return &types.Block{ - ParentBlockHash: parent, - Height: height, - TotalSupply: big.NewInt(1000), - ReceiptRoot: common.HexToHash(fmt.Sprintf("0x1337%d", height)), + return &models.Block{ + Block: &types.Block{ + ParentBlockHash: parent, + Height: height, + TotalSupply: big.NewInt(1000), + ReceiptRoot: common.HexToHash(fmt.Sprintf("0x1337%d", height)), + }, TransactionHashes: make([]common.Hash, 0), } } From 5f16e607702544a09f62db8b0f73a95011620b85 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:32:33 +0200 Subject: [PATCH 25/55] fix event type --- services/ingestion/subscriber.go | 6 +++--- storage/mocks/BlockIndexer.go | 28 ++++++++++++++-------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/services/ingestion/subscriber.go b/services/ingestion/subscriber.go index f0c1a218..f127e260 100644 --- a/services/ingestion/subscriber.go +++ b/services/ingestion/subscriber.go @@ -6,13 +6,13 @@ import ( "fmt" "github.com/onflow/cadence/runtime/common" + "github.com/onflow/flow-go/fvm/evm/events" "github.com/onflow/flow-evm-gateway/models" "github.com/onflow/flow-evm-gateway/services/requester" "github.com/onflow/flow-go-sdk" "github.com/onflow/flow-go-sdk/access" - "github.com/onflow/flow-go/fvm/evm/types" "github.com/onflow/flow-go/fvm/systemcontracts" flowGo "github.com/onflow/flow-go/model/flow" "github.com/rs/zerolog" @@ -234,13 +234,13 @@ func (r *RPCSubscriber) blocksFilter() flow.EventFilter { blockExecutedEvent := common.NewAddressLocation( nil, evmAddress, - string(types.EventTypeBlockExecuted), + string(events.EventTypeBlockExecuted), ).ID() transactionExecutedEvent := common.NewAddressLocation( nil, evmAddress, - string(types.EventTypeTransactionExecuted), + string(events.EventTypeTransactionExecuted), ).ID() return flow.EventFilter{ diff --git a/storage/mocks/BlockIndexer.go b/storage/mocks/BlockIndexer.go index c5828c7a..db28171e 100644 --- a/storage/mocks/BlockIndexer.go +++ b/storage/mocks/BlockIndexer.go @@ -8,9 +8,9 @@ import ( mock "github.com/stretchr/testify/mock" - pebble "github.com/cockroachdb/pebble" + models "github.com/onflow/flow-evm-gateway/models" - types "github.com/onflow/flow-go/fvm/evm/types" + pebble "github.com/cockroachdb/pebble" ) // BlockIndexer is an autogenerated mock type for the BlockIndexer type @@ -19,23 +19,23 @@ type BlockIndexer struct { } // GetByHeight provides a mock function with given fields: height -func (_m *BlockIndexer) GetByHeight(height uint64) (*types.Block, error) { +func (_m *BlockIndexer) GetByHeight(height uint64) (*models.Block, error) { ret := _m.Called(height) if len(ret) == 0 { panic("no return value specified for GetByHeight") } - var r0 *types.Block + var r0 *models.Block var r1 error - if rf, ok := ret.Get(0).(func(uint64) (*types.Block, error)); ok { + if rf, ok := ret.Get(0).(func(uint64) (*models.Block, error)); ok { return rf(height) } - if rf, ok := ret.Get(0).(func(uint64) *types.Block); ok { + if rf, ok := ret.Get(0).(func(uint64) *models.Block); ok { r0 = rf(height) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Block) + r0 = ret.Get(0).(*models.Block) } } @@ -49,23 +49,23 @@ func (_m *BlockIndexer) GetByHeight(height uint64) (*types.Block, error) { } // GetByID provides a mock function with given fields: ID -func (_m *BlockIndexer) GetByID(ID common.Hash) (*types.Block, error) { +func (_m *BlockIndexer) GetByID(ID common.Hash) (*models.Block, error) { ret := _m.Called(ID) if len(ret) == 0 { panic("no return value specified for GetByID") } - var r0 *types.Block + var r0 *models.Block var r1 error - if rf, ok := ret.Get(0).(func(common.Hash) (*types.Block, error)); ok { + if rf, ok := ret.Get(0).(func(common.Hash) (*models.Block, error)); ok { return rf(ID) } - if rf, ok := ret.Get(0).(func(common.Hash) *types.Block); ok { + if rf, ok := ret.Get(0).(func(common.Hash) *models.Block); ok { r0 = rf(ID) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Block) + r0 = ret.Get(0).(*models.Block) } } @@ -239,7 +239,7 @@ func (_m *BlockIndexer) SetLatestCadenceHeight(height uint64, batch *pebble.Batc } // Store provides a mock function with given fields: cadenceHeight, cadenceID, block, batch -func (_m *BlockIndexer) Store(cadenceHeight uint64, cadenceID flow.Identifier, block *types.Block, batch *pebble.Batch) error { +func (_m *BlockIndexer) Store(cadenceHeight uint64, cadenceID flow.Identifier, block *models.Block, batch *pebble.Batch) error { ret := _m.Called(cadenceHeight, cadenceID, block, batch) if len(ret) == 0 { @@ -247,7 +247,7 @@ func (_m *BlockIndexer) Store(cadenceHeight uint64, cadenceID flow.Identifier, b } var r0 error - if rf, ok := ret.Get(0).(func(uint64, flow.Identifier, *types.Block, *pebble.Batch) error); ok { + if rf, ok := ret.Get(0).(func(uint64, flow.Identifier, *models.Block, *pebble.Batch) error); ok { r0 = rf(cadenceHeight, cadenceID, block, batch) } else { r0 = ret.Error(0) From 316fbc34e30e8f34dc880fc15d246f95756e154e Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:34:35 +0200 Subject: [PATCH 26/55] fix trace engine block type --- services/traces/engine.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/services/traces/engine.go b/services/traces/engine.go index 4d64396c..2203e407 100644 --- a/services/traces/engine.go +++ b/services/traces/engine.go @@ -8,7 +8,6 @@ import ( "github.com/google/uuid" "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go/fvm/evm/types" gethCommon "github.com/onflow/go-ethereum/common" "github.com/rs/zerolog" "github.com/sethvargo/go-retry" @@ -60,7 +59,7 @@ func (e *Engine) Run(ctx context.Context) error { // Notify is a handler that is being used to subscribe for new EVM block notifications. // This method should be non-blocking. func (e *Engine) Notify(data any) { - block, ok := data.(*types.Block) + block, ok := data.(*models.Block) if !ok { e.logger.Error().Msg("invalid event type sent to trace ingestion") return @@ -78,7 +77,7 @@ func (e *Engine) Notify(data any) { } // indexBlockTraces iterates the block transaction hashes and tries to download the traces -func (e *Engine) indexBlockTraces(evmBlock *types.Block, cadenceBlockID flow.Identifier) { +func (e *Engine) indexBlockTraces(evmBlock *models.Block, cadenceBlockID flow.Identifier) { ctx, cancel := context.WithTimeout(context.Background(), downloadTimeout) defer cancel() From e708055d2e18fccfe6bd2296f81b362d5bfcb7ce Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:38:18 +0200 Subject: [PATCH 27/55] update engine test type changes --- services/ingestion/engine_test.go | 59 +++++++++++++++++-------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/services/ingestion/engine_test.go b/services/ingestion/engine_test.go index 15a4e4c5..dbbf1130 100644 --- a/services/ingestion/engine_test.go +++ b/services/ingestion/engine_test.go @@ -7,12 +7,13 @@ import ( "testing" pebbleDB "github.com/cockroachdb/pebble" + "github.com/onflow/flow-go/fvm/evm/events" + flowGo "github.com/onflow/flow-go/model/flow" "github.com/onflow/flow-evm-gateway/services/ingestion/mocks" "github.com/onflow/flow-evm-gateway/storage/pebble" "github.com/onflow/cadence" - "github.com/onflow/cadence/runtime/common" "github.com/onflow/flow-evm-gateway/models" @@ -173,28 +174,34 @@ func TestSerialBlockIngestion(t *testing.T) { }). Once() // this should only be called for first valid block + cadenceEvents, err := models.NewCadenceEvents(flow.BlockEvents{ + Events: []flow.Event{{ + Type: string(blockEvent.Etype), + Value: blockCdc, + }}, + Height: cadenceHeight, + }) + require.NoError(t, err) + eventsChan <- models.BlockEvents{ - Events: models.NewCadenceEvents(flow.BlockEvents{ - Events: []flow.Event{{ - Type: string(blockEvent.Etype), - Value: blockCdc, - }}, - Height: cadenceHeight, - }), + Events: cadenceEvents, } // fail with next block height being incorrect blockCdc, _, blockEvent, err = newBlock(latestHeight + 10) // not sequential next block height require.NoError(t, err) + cadenceEvents, err = models.NewCadenceEvents(flow.BlockEvents{ + Events: []flow.Event{{ + Type: string(blockEvent.Etype), + Value: blockCdc, + }}, + Height: cadenceHeight + 1, + }) + require.NoError(t, err) + eventsChan <- models.BlockEvents{ - Events: models.NewCadenceEvents(flow.BlockEvents{ - Events: []flow.Event{{ - Type: string(blockEvent.Etype), - Value: blockCdc, - }}, - Height: cadenceHeight + 1, - }), + Events: cadenceEvents, } close(eventsChan) @@ -529,25 +536,26 @@ func TestBlockAndTransactionIngestion(t *testing.T) { }) } -func newBlock(height uint64) (cadence.Event, *types.Block, *types.Event, error) { - block := &types.Block{ +func newBlock(height uint64) (cadence.Event, *models.Block, *events.Event, error) { + gethBlock := &types.Block{ ParentBlockHash: gethCommon.HexToHash("0x1"), Height: height, TotalSupply: big.NewInt(100), ReceiptRoot: gethCommon.HexToHash("0x2"), + } + block := &models.Block{ + Block: gethBlock, TransactionHashes: []gethCommon.Hash{ gethCommon.HexToHash("0xf1"), }, } - blockEvent := types.NewBlockEvent(block) - location := common.NewAddressLocation(nil, common.Address{0x1}, string(types.EventTypeBlockExecuted)) - blockCdc, err := blockEvent.Payload.ToCadence(location) - + blockEvent := events.NewBlockEvent(gethBlock) + blockCdc, err := blockEvent.Payload.ToCadence(flowGo.Previewnet) return blockCdc, block, blockEvent, err } -func newTransaction() (cadence.Event, *types.Event, models.Transaction, *types.Result, error) { +func newTransaction() (cadence.Event, *events.Event, models.Transaction, *types.Result, error) { res := &types.Result{ VMError: nil, TxType: 1, @@ -574,15 +582,12 @@ func newTransaction() (cadence.Event, *types.Event, models.Transaction, *types.R return cadence.Event{}, nil, nil, nil, err } - ev := types.NewTransactionEvent( + ev := events.NewTransactionEvent( res, txEncoded, 1, - tx.Hash(), ) - location := common.NewAddressLocation(nil, common.Address{0x1}, string(types.EventTypeBlockExecuted)) - cdcEv, err := ev.Payload.ToCadence(location) - + cdcEv, err := ev.Payload.ToCadence(flowGo.Previewnet) return cdcEv, ev, models.TransactionCall{Transaction: tx}, res, err } From 11836fd49d94b7c1cd1cdbd73b621d66abf1f1bb Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:39:48 +0200 Subject: [PATCH 28/55] fix requester index type change --- services/requester/requester.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/requester/requester.go b/services/requester/requester.go index ac6a7f98..7cb84d3d 100644 --- a/services/requester/requester.go +++ b/services/requester/requester.go @@ -249,7 +249,7 @@ func (e *EVM) buildTransaction(ctx context.Context, script []byte, args ...caden g = errgroup.Group{} err1, err2 error latestBlock *flow.Block - index int + index uint32 seqNum uint64 ) // execute concurrently so we can speed up all the information we need for tx @@ -596,7 +596,7 @@ func (e *EVM) GetLatestEVMHeight(ctx context.Context) (uint64, error) { } // getSignerNetworkInfo loads the signer account from network and returns key index and sequence number -func (e *EVM) getSignerNetworkInfo(ctx context.Context) (int, uint64, error) { +func (e *EVM) getSignerNetworkInfo(ctx context.Context) (uint32, uint64, error) { account, err := e.client.GetAccount(ctx, e.config.COAAddress) if err != nil { return 0, 0, fmt.Errorf("failed to get signer info account: %w", err) From c38b7b695f6bc4419f6928e05ba641ccf4f022c7 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:41:11 +0200 Subject: [PATCH 29/55] update changes in stream block type and geth --- api/stream.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/api/stream.go b/api/stream.go index 64923224..9bd81e44 100644 --- a/api/stream.go +++ b/api/stream.go @@ -5,7 +5,6 @@ import ( "fmt" "math/big" - "github.com/onflow/flow-go/fvm/evm/types" "github.com/onflow/go-ethereum/common" "github.com/onflow/go-ethereum/common/hexutil" gethTypes "github.com/onflow/go-ethereum/core/types" @@ -63,7 +62,7 @@ func (s *StreamAPI) NewHeads(ctx context.Context) (*rpc.Subscription, error) { s.blocksPublisher, func(notifier *rpc.Notifier, sub *rpc.Subscription) func(any) error { return func(data any) error { - block, ok := data.(*types.Block) + block, ok := data.(*models.Block) if !ok { return fmt.Errorf("invalid data sent to block subscription") } @@ -179,9 +178,6 @@ func (s *StreamAPI) newSubscription( case err := <-rpcSub.Err(): l.Debug().Err(err).Msg("client unsubscribed") return - case <-notifier.Closed(): - l.Debug().Msg("client unsubscribed deprecated method") - return } } }() From b149897f6b919ee7bb64dfe728a9ab5b9040d3c7 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:04:13 +0200 Subject: [PATCH 30/55] fix slog logger change --- api/server.go | 16 ++++------------ go.mod | 2 ++ go.sum | 4 ++++ 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/api/server.go b/api/server.go index bc6f6c93..fcf3da89 100644 --- a/api/server.go +++ b/api/server.go @@ -12,6 +12,7 @@ import ( "errors" "fmt" "io" + "log/slog" "net" "net/http" "strings" @@ -21,6 +22,7 @@ import ( "github.com/onflow/go-ethereum/rpc" "github.com/rs/cors" "github.com/rs/zerolog" + slogzerolog "github.com/samber/slog-zerolog" errs "github.com/onflow/flow-evm-gateway/api/errors" "github.com/onflow/flow-evm-gateway/config" @@ -59,18 +61,8 @@ const ( ) func NewHTTPServer(logger zerolog.Logger, cfg *config.Config) *httpServer { - gethLog.Root().SetHandler(gethLog.FuncHandler(func(r *gethLog.Record) error { - switch r.Lvl { - case gethLog.LvlInfo: - logger.Info().Msg(r.Msg) - case gethLog.LvlError: - logger.Error().Str("trace", r.Call.String()).Msg(r.Msg) - default: - logger.Debug().Msg(r.Msg) - } - - return nil - })) + zeroSlog := slogzerolog.Option{Logger: &logger}.NewZerologHandler() + gethLog.SetDefault(gethLog.NewLogger(slog.New(zeroSlog).Handler())) return &httpServer{ logger: logger, diff --git a/go.mod b/go.mod index 767661fa..ecbff6e8 100644 --- a/go.mod +++ b/go.mod @@ -154,6 +154,8 @@ require ( github.com/psiemens/sconfig v0.1.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/samber/lo v1.39.0 // indirect + github.com/samber/slog-zerolog v1.0.0 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/slok/go-http-metrics v0.10.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect diff --git a/go.sum b/go.sum index f621153d..c9f4fd04 100644 --- a/go.sum +++ b/go.sum @@ -1998,6 +1998,10 @@ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samber/lo v1.39.0 h1:4gTz1wUhNYLhFSKl6O+8peW0v2F4BCY034GRpU9WnuA= +github.com/samber/lo v1.39.0/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= +github.com/samber/slog-zerolog v1.0.0 h1:YpRy0xux1uJr0Ng3wrEjv9nyvb4RAoNqkS611UjzeG8= +github.com/samber/slog-zerolog v1.0.0/go.mod h1:N2/g/mNGRY1zqsydIYE0uKipSSFsPDjytoVkRnZ0Jp0= github.com/schollz/progressbar/v3 v3.13.1 h1:o8rySDYiQ59Mwzy2FELeHY5ZARXZTVJC7iHD6PEFUiE= github.com/schollz/progressbar/v3 v3.13.1/go.mod h1:xvrbki8kfT1fzWzBT/UZd9L6GA+jdL7HAgq2RFnO6fQ= github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= From d8a4ec5644a20f520403135f3b77ab99ddb220a7 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:05:39 +0200 Subject: [PATCH 31/55] use model block type --- api/api.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/api/api.go b/api/api.go index dfb359fb..6c58f450 100644 --- a/api/api.go +++ b/api/api.go @@ -9,7 +9,6 @@ import ( "math/big" "strings" - evmTypes "github.com/onflow/flow-go/fvm/evm/types" "github.com/onflow/go-ethereum/common" "github.com/onflow/go-ethereum/common/hexutil" "github.com/onflow/go-ethereum/common/math" @@ -429,7 +428,7 @@ func (b *BlockChainAPI) GetBlockReceipts( } var ( - block *evmTypes.Block + block *models.Block err error ) if numHash.BlockHash != nil { @@ -861,7 +860,7 @@ func (b *BlockChainAPI) GetStorageAt( func (b *BlockChainAPI) fetchBlockTransactions( ctx context.Context, - block *evmTypes.Block, + block *models.Block, ) ([]*Transaction, error) { transactions := make([]*Transaction, 0) for _, txHash := range block.TransactionHashes { @@ -885,7 +884,7 @@ func (b *BlockChainAPI) fetchBlockTransactions( func (b *BlockChainAPI) prepareBlockResponse( ctx context.Context, - block *evmTypes.Block, + block *models.Block, fullTx bool, ) (*Block, error) { h, err := block.Hash() From ad2c7569a9524d66c2da8f804a32c2e3ae75d4e1 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:06:23 +0200 Subject: [PATCH 32/55] update helper cli --- bootstrap/create-multi-key-account.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap/create-multi-key-account.go b/bootstrap/create-multi-key-account.go index 229405e8..a65a81fa 100644 --- a/bootstrap/create-multi-key-account.go +++ b/bootstrap/create-multi-key-account.go @@ -89,7 +89,7 @@ func CreateMultiKeyAccount( pks[i] = pk privKeys[i] = &flow.AccountKey{ - Index: i, + Index: uint32(i), PublicKey: pk.PublicKey(), SigAlgo: crypto.ECDSA_P256, HashAlgo: crypto.SHA3_256, @@ -155,7 +155,7 @@ func CreateMultiKeyAccount( } var seq uint64 - var index int + var index uint32 for _, k := range acc.Keys { if k.PublicKey.Equals(key.PublicKey()) { seq = k.SequenceNumber @@ -216,7 +216,7 @@ func CreateMultiCloudKMSKeysAccount( } accountKeys[i] = &flow.AccountKey{ - Index: i, + Index: uint32(i), PublicKey: publicKey, SigAlgo: crypto.ECDSA_P256, HashAlgo: crypto.SHA2_256, @@ -282,7 +282,7 @@ func CreateMultiCloudKMSKeysAccount( } var seq uint64 - var index int + var index uint32 for _, k := range acc.Keys { if k.PublicKey.Equals(key.PublicKey()) { seq = k.SequenceNumber From 8a45d5b72d7ff8851acf1a138304097dbeeaa131 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:07:01 +0200 Subject: [PATCH 33/55] update model type --- services/traces/engine_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/services/traces/engine_test.go b/services/traces/engine_test.go index b0264847..22162ec5 100644 --- a/services/traces/engine_test.go +++ b/services/traces/engine_test.go @@ -11,7 +11,6 @@ import ( pebbleDB "github.com/cockroachdb/pebble" "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go/fvm/evm/types" gethCommon "github.com/onflow/go-ethereum/common" "github.com/rs/zerolog" "github.com/stretchr/testify/mock" @@ -50,7 +49,7 @@ func TestTraceIngestion(t *testing.T) { blocks. On("GetByHeight", mock.Anything). - Return(func(height uint64) (*types.Block, error) { + Return(func(height uint64) (*models.Block, error) { require.Equal(t, latestHeight+1, height) // make sure it gets next block return block, nil }) @@ -127,7 +126,7 @@ func TestTraceIngestion(t *testing.T) { const txCount = 50 // generate mock blocks, each with mock transactions - mockBlocks := make([]*types.Block, blockCount+1) + mockBlocks := make([]*models.Block, blockCount+1) mockCadenceIDs := make([]flow.Identifier, blockCount+1) for i := range mockBlocks { @@ -230,7 +229,7 @@ func TestTraceIngestion(t *testing.T) { blocks. On("GetByHeight", mock.Anything). - Return(func(height uint64) (*types.Block, error) { + Return(func(height uint64) (*models.Block, error) { require.Equal(t, latestHeight+1, height) // make sure it gets next block return block, nil }) From 30dcc5369318dcdcf2384560be70f0ff75a065ba Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:28:14 +0200 Subject: [PATCH 34/55] fix bug in decode --- models/block.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/block.go b/models/block.go index 1133df28..c8f2eb0e 100644 --- a/models/block.go +++ b/models/block.go @@ -23,7 +23,7 @@ var GenesisBlock = &Block{Block: types.GenesisBlock} func NewBlockFromBytes(data []byte) (*Block, error) { var b *Block - return b, rlp.DecodeBytes(data, b) + return b, rlp.DecodeBytes(data, &b) } type Block struct { From ebfcc0645f883fdea48c0d90abeecbd0e3e67933 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:28:19 +0200 Subject: [PATCH 35/55] add test for decode block --- models/block_test.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/models/block_test.go b/models/block_test.go index 79082ef7..ecc5a1ea 100644 --- a/models/block_test.go +++ b/models/block_test.go @@ -60,3 +60,28 @@ func Test_Hash(t *testing.T) { require.NoError(t, err) require.Equal(t, hash, h.String()) } + +func Test_EncodingDecoding(t *testing.T) { + block := &Block{ + Block: &types.Block{ + ParentBlockHash: gethCommon.HexToHash("0x1"), + Height: 100, + TotalSupply: big.NewInt(100), + ReceiptRoot: gethCommon.HexToHash("0x2"), + TransactionHashRoot: gethCommon.HexToHash("0x3"), + TotalGasUsed: uint64(30), + }, + TransactionHashes: []gethCommon.Hash{ + gethCommon.HexToHash("0x55"), + gethCommon.HexToHash("0x66"), + }, + } + + bytes, err := block.ToBytes() + require.NoError(t, err) + + blockDec, err := NewBlockFromBytes(bytes) + require.NoError(t, err) + + assert.Equal(t, block, blockDec) +} From 773aa51604cc926bbaddafcdcf5792a794a409d6 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:28:28 +0200 Subject: [PATCH 36/55] fix transaction test change in error --- models/transaction_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/transaction_test.go b/models/transaction_test.go index 5559f746..cc2529d5 100644 --- a/models/transaction_test.go +++ b/models/transaction_test.go @@ -734,7 +734,7 @@ func TestValidateConsensusRules(t *testing.T) { assert.ErrorContains( t, err, - fmt.Sprintf("%s: needed %v, allowed %v", core.ErrIntrinsicGas.Error(), 21_000, gasLimit), + fmt.Sprintf("%s: gas %v, minimum needed %v", core.ErrIntrinsicGas.Error(), gasLimit, 21_000), ) }) } From c70c8ca8d3f09b62da4fe4abed5170710ec81029 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:42:08 +0200 Subject: [PATCH 37/55] update mock blocks --- services/logs/filter_test.go | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/services/logs/filter_test.go b/services/logs/filter_test.go index 170a510f..6c1cba84 100644 --- a/services/logs/filter_test.go +++ b/services/logs/filter_test.go @@ -4,22 +4,28 @@ import ( "math/big" "testing" - "github.com/onflow/flow-evm-gateway/models" - "github.com/onflow/flow-evm-gateway/storage" - "github.com/onflow/flow-evm-gateway/storage/errors" - "github.com/onflow/flow-evm-gateway/storage/mocks" "github.com/onflow/flow-go/fvm/evm/types" "github.com/onflow/go-ethereum/common" gethTypes "github.com/onflow/go-ethereum/core/types" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + + "github.com/onflow/flow-evm-gateway/models" + "github.com/onflow/flow-evm-gateway/storage" + "github.com/onflow/flow-evm-gateway/storage/errors" + "github.com/onflow/flow-evm-gateway/storage/mocks" ) -var blocks = []*types.Block{ - {Height: 0}, {Height: 1}, {Height: 2}, {Height: 3}, {Height: 4}, {Height: 5}, +var blocks = []*models.Block{ + {Block: &types.Block{Height: 0}}, + {Block: &types.Block{Height: 1}}, + {Block: &types.Block{Height: 2}}, + {Block: &types.Block{Height: 3}}, + {Block: &types.Block{Height: 4}}, + {Block: &types.Block{Height: 5}}, } -func mustHash(b *types.Block) common.Hash { +func mustHash(b *models.Block) common.Hash { h, err := b.Hash() if err != nil { panic(err) @@ -91,7 +97,7 @@ func blockStorage() storage.BlockIndexer { blockStorage := &mocks.BlockIndexer{} blockStorage. On("GetByID", mock.AnythingOfType("common.Hash")). - Return(func(id common.Hash) (*types.Block, error) { + Return(func(id common.Hash) (*models.Block, error) { for _, b := range blocks { if mustHash(b).Cmp(id) == 0 { return b, nil From a878b512f67a4fee4b203028994f06ed7900bd13 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:44:38 +0200 Subject: [PATCH 38/55] update block storage mocks --- services/ingestion/engine_test.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/services/ingestion/engine_test.go b/services/ingestion/engine_test.go index dbbf1130..71c99dab 100644 --- a/services/ingestion/engine_test.go +++ b/services/ingestion/engine_test.go @@ -87,8 +87,8 @@ func TestSerialBlockIngestion(t *testing.T) { require.NoError(t, err) blocks. - On("Store", mock.AnythingOfType("uint64"), mock.Anything, mock.AnythingOfType("*types.Block"), mock.Anything). - Return(func(h uint64, id flow.Identifier, storeBlock *types.Block, _ *pebbleDB.Batch) error { + On("Store", mock.AnythingOfType("uint64"), mock.Anything, mock.AnythingOfType("*models.Block"), mock.Anything). + Return(func(h uint64, id flow.Identifier, storeBlock *models.Block, _ *pebbleDB.Batch) error { assert.Equal(t, block, storeBlock) assert.Equal(t, cadenceHeight, h) storedCounter++ @@ -166,8 +166,8 @@ func TestSerialBlockIngestion(t *testing.T) { require.NoError(t, err) blocks. - On("Store", mock.AnythingOfType("uint64"), mock.Anything, mock.AnythingOfType("*types.Block"), mock.Anything). - Return(func(h uint64, id flow.Identifier, storeBlock *types.Block, _ *pebbleDB.Batch) error { + On("Store", mock.AnythingOfType("uint64"), mock.Anything, mock.AnythingOfType("*models.Block"), mock.Anything). + Return(func(h uint64, id flow.Identifier, storeBlock *models.Block, _ *pebbleDB.Batch) error { assert.Equal(t, block, storeBlock) assert.Equal(t, cadenceHeight, h) return nil @@ -274,8 +274,8 @@ func TestBlockAndTransactionIngestion(t *testing.T) { }() blocks. - On("Store", mock.AnythingOfType("uint64"), mock.Anything, mock.AnythingOfType("*types.Block"), mock.Anything). - Return(func(h uint64, id flow.Identifier, storeBlock *types.Block, _ *pebbleDB.Batch) error { + On("Store", mock.AnythingOfType("uint64"), mock.Anything, mock.AnythingOfType("*models.Block"), mock.Anything). + Return(func(h uint64, id flow.Identifier, storeBlock *models.Block, _ *pebbleDB.Batch) error { assert.Equal(t, block, storeBlock) assert.Equal(t, blockID, id) assert.Equal(t, nextHeight, h) @@ -373,8 +373,8 @@ func TestBlockAndTransactionIngestion(t *testing.T) { blocksFirst := false // flag indicating we stored block first blocks. - On("Store", mock.AnythingOfType("uint64"), mock.Anything, mock.AnythingOfType("*types.Block"), mock.Anything). - Return(func(h uint64, id flow.Identifier, storeBlock *types.Block, _ *pebbleDB.Batch) error { + On("Store", mock.AnythingOfType("uint64"), mock.Anything, mock.AnythingOfType("*models.Block"), mock.Anything). + Return(func(h uint64, id flow.Identifier, storeBlock *models.Block, _ *pebbleDB.Batch) error { blocksFirst = true return nil }). @@ -477,8 +477,8 @@ func TestBlockAndTransactionIngestion(t *testing.T) { // add new block for each height blocks. - On("Store", mock.AnythingOfType("uint64"), mock.Anything, mock.AnythingOfType("*types.Block"), mock.Anything). - Return(func(h uint64, id flow.Identifier, storeBlock *types.Block, _ *pebbleDB.Batch) error { + On("Store", mock.AnythingOfType("uint64"), mock.Anything, mock.AnythingOfType("*models.Block"), mock.Anything). + Return(func(h uint64, id flow.Identifier, storeBlock *models.Block, _ *pebbleDB.Batch) error { assert.Equal(t, block, storeBlock) assert.Equal(t, evmHeight, block.Height) assert.Equal(t, latestCadenceHeight+1, h) From 59eb69a6e636fdeaccb148df598d7ab48417263c Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 17:48:59 +0200 Subject: [PATCH 39/55] fix engine ingestion test --- services/ingestion/engine_test.go | 79 ++++++++++++++++--------------- 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/services/ingestion/engine_test.go b/services/ingestion/engine_test.go index 71c99dab..5ed8fc88 100644 --- a/services/ingestion/engine_test.go +++ b/services/ingestion/engine_test.go @@ -83,7 +83,7 @@ func TestSerialBlockIngestion(t *testing.T) { runs := uint64(20) for i := latestHeight + 1; i < latestHeight+runs; i++ { cadenceHeight := i + 10 - blockCdc, block, blockEvent, err := newBlock(i) + blockCdc, block, blockEvent, err := newBlock(i, nil) require.NoError(t, err) blocks. @@ -161,7 +161,7 @@ func TestSerialBlockIngestion(t *testing.T) { }() // first create one successful block event - blockCdc, block, blockEvent, err := newBlock(latestHeight + 1) + blockCdc, block, blockEvent, err := newBlock(latestHeight+1, nil) cadenceHeight := latestHeight + 10 require.NoError(t, err) @@ -188,7 +188,7 @@ func TestSerialBlockIngestion(t *testing.T) { } // fail with next block height being incorrect - blockCdc, _, blockEvent, err = newBlock(latestHeight + 10) // not sequential next block height + blockCdc, _, blockEvent, err = newBlock(latestHeight+10, nil) // not sequential next block height require.NoError(t, err) cadenceEvents, err = models.NewCadenceEvents(flow.BlockEvents{ @@ -251,7 +251,7 @@ func TestBlockAndTransactionIngestion(t *testing.T) { txCdc, txEvent, transaction, result, err := newTransaction() require.NoError(t, err) - blockCdc, block, blockEvent, err := newBlock(nextHeight) + blockCdc, block, blockEvent, err := newBlock(nextHeight, []gethCommon.Hash{result.TxHash}) require.NoError(t, err) engine := NewEventIngestionEngine( @@ -347,9 +347,9 @@ func TestBlockAndTransactionIngestion(t *testing.T) { return eventsChan }) - txCdc, txEvent, _, _, err := newTransaction() + txCdc, txEvent, _, res, err := newTransaction() require.NoError(t, err) - blockCdc, _, blockEvent, err := newBlock(nextHeight) + blockCdc, _, blockEvent, err := newBlock(nextHeight, []gethCommon.Hash{res.TxHash}) require.NoError(t, err) engine := NewEventIngestionEngine( @@ -415,7 +415,7 @@ func TestBlockAndTransactionIngestion(t *testing.T) { <-done }) - t.Run("ingest multiple blocks and transactions in same block event, even if out-of-order", func(t *testing.T) { + t.Run("ingest block and multiple transactions in same block event, even if out-of-order", func(t *testing.T) { receipts := &storageMock.ReceiptIndexer{} transactions := &storageMock.TransactionIndexer{} latestCadenceHeight := uint64(0) @@ -465,35 +465,15 @@ func TestBlockAndTransactionIngestion(t *testing.T) { close(done) }() - blocksStored := 0 + events := make([]flow.Event, 0) + blockIndexedFirst := false txsStored := 0 eventCount := 5 - blockIndexedFirst := false - events := make([]flow.Event, 0) - for i := 0; i < eventCount; i++ { - evmHeight := uint64(i) - blockCdc, block, blockEvent, err := newBlock(evmHeight) - require.NoError(t, err) - - // add new block for each height - blocks. - On("Store", mock.AnythingOfType("uint64"), mock.Anything, mock.AnythingOfType("*models.Block"), mock.Anything). - Return(func(h uint64, id flow.Identifier, storeBlock *models.Block, _ *pebbleDB.Batch) error { - assert.Equal(t, block, storeBlock) - assert.Equal(t, evmHeight, block.Height) - assert.Equal(t, latestCadenceHeight+1, h) - blockIndexedFirst = true - blocksStored++ - return nil - }). - Once() - - events = append(events, flow.Event{ - Type: string(blockEvent.Etype), - Value: blockCdc, - }) + txHashes := make([]gethCommon.Hash, eventCount) - txCdc, txEvent, transaction, _, err := newTransaction() + for i := 0; i < eventCount; i++ { + txCdc, txEvent, transaction, res, err := newTransaction() + txHashes[i] = res.TxHash require.NoError(t, err) // add a single transaction for each block @@ -518,6 +498,28 @@ func TestBlockAndTransactionIngestion(t *testing.T) { }) } + blocksStored := 0 + evmHeight := uint64(0) + blockCdc, block, blockEvent, err := newBlock(evmHeight, txHashes) + require.NoError(t, err) + + blocks. + On("Store", mock.AnythingOfType("uint64"), mock.Anything, mock.AnythingOfType("*models.Block"), mock.Anything). + Return(func(h uint64, id flow.Identifier, storeBlock *models.Block, _ *pebbleDB.Batch) error { + assert.Equal(t, block, storeBlock) + assert.Equal(t, evmHeight, block.Height) + assert.Equal(t, latestCadenceHeight+1, h) + blockIndexedFirst = true + blocksStored++ + return nil + }). + Once() + + events = append(events, flow.Event{ + Type: string(blockEvent.Etype), + Value: blockCdc, + }) + // this messes up order of events to test if we still process events in-order // it will make transaction event first and then block event events[0], events[1] = events[1], events[0] @@ -532,11 +534,11 @@ func TestBlockAndTransactionIngestion(t *testing.T) { close(eventsChan) <-done assert.Equal(t, eventCount, txsStored) - assert.Equal(t, eventCount, blocksStored) + assert.Equal(t, 1, blocksStored) }) } -func newBlock(height uint64) (cadence.Event, *models.Block, *events.Event, error) { +func newBlock(height uint64, txHashes []gethCommon.Hash) (cadence.Event, *models.Block, *events.Event, error) { gethBlock := &types.Block{ ParentBlockHash: gethCommon.HexToHash("0x1"), Height: height, @@ -544,10 +546,8 @@ func newBlock(height uint64) (cadence.Event, *models.Block, *events.Event, error ReceiptRoot: gethCommon.HexToHash("0x2"), } block := &models.Block{ - Block: gethBlock, - TransactionHashes: []gethCommon.Hash{ - gethCommon.HexToHash("0xf1"), - }, + Block: gethBlock, + TransactionHashes: txHashes, } blockEvent := events.NewBlockEvent(gethBlock) @@ -569,6 +569,7 @@ func newTransaction() (cadence.Event, *events.Event, models.Transaction, *types. Address: gethCommon.Address{0x3, 0x5}, Topics: []gethCommon.Hash{{0x2, 0x66}, {0x7, 0x1}}, }}, + TxHash: gethCommon.HexToHash("0x33"), } txEncoded, err := hex.DecodeString("f9015880808301e8488080b901086060604052341561000f57600080fd5b60eb8061001d6000396000f300606060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063c6888fa1146044575b600080fd5b3415604e57600080fd5b606260048080359060200190919050506078565b6040518082815260200191505060405180910390f35b60007f24abdb5865df5079dcc5ac590ff6f01d5c16edbc5fab4e195d9febd1114503da600783026040518082815260200191505060405180910390a16007820290509190505600a165627a7a7230582040383f19d9f65246752244189b02f56e8d0980ed44e7a56c0b200458caad20bb002982052fa09c05a7389284dc02b356ec7dee8a023c5efd3a9d844fa3c481882684b0640866a057e96d0a71a857ed509bb2b7333e78b2408574b8cc7f51238f25c58812662653") From 67de039c2b1f3c8a037c97398c5b6f3dec919968 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Wed, 24 Jul 2024 18:42:24 +0200 Subject: [PATCH 40/55] add event decoding tests --- models/events_test.go | 118 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 115 insertions(+), 3 deletions(-) diff --git a/models/events_test.go b/models/events_test.go index 9eb90b05..94e13cfc 100644 --- a/models/events_test.go +++ b/models/events_test.go @@ -10,6 +10,7 @@ import ( "github.com/onflow/flow-go/fvm/evm/types" flowGo "github.com/onflow/flow-go/model/flow" gethCommon "github.com/onflow/go-ethereum/common" + gethTypes "github.com/onflow/go-ethereum/core/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -17,7 +18,7 @@ import ( func TestCadenceEvents_Block(t *testing.T) { invalid := cadence.String("invalid") - b0, e0, err := newBlock(0) + b0, e0, err := newBlock(0, nil) require.NoError(t, err) tests := []struct { @@ -62,9 +63,120 @@ func TestCadenceEvents_Block(t *testing.T) { } } -func newBlock(height uint64) (*Block, flow.Event, error) { +func Test_EventDecoding(t *testing.T) { + cadenceHeight := uint64(1) + txCount := 10 + txEvents := make([]flow.Event, txCount) + txs := make([]Transaction, txCount) + hashes := make([]gethCommon.Hash, txCount) + results := make([]*types.Result, txCount) + + blockEvents := flow.BlockEvents{ + BlockID: flow.Identifier{0x1}, + Height: cadenceHeight, + } + + // generate txs + for i := 0; i < txCount; i++ { + var err error + txs[i], results[i], txEvents[i], err = newTransaction(uint64(i)) + require.NoError(t, err) + hashes[i] = txs[i].Hash() + blockEvents.Events = append(blockEvents.Events, txEvents[i]) + } + + // generate single block + block, blockEvent, err := newBlock(1, hashes) + blockEvents.Events = append(blockEvents.Events, blockEvent) + + cadenceEvents, err := NewCadenceEvents(blockEvents) + require.NoError(t, err) + + assert.Equal(t, block, cadenceEvents.Block()) + assert.False(t, cadenceEvents.Empty()) + assert.Equal(t, cadenceHeight, cadenceEvents.CadenceHeight()) + assert.Equal(t, cadenceEvents.Block().TransactionHashes, hashes) + + require.Equal(t, txCount+1, cadenceEvents.Length()) // +1 is for block event + require.Equal(t, txCount, len(cadenceEvents.Receipts())) + require.Equal(t, txCount, len(cadenceEvents.Transactions())) + + cumulative := uint64(1) + for i := 0; i < txCount; i++ { + tx := cadenceEvents.Transactions()[i] + rcp := cadenceEvents.Receipts()[i] + blockHash, err := block.Hash() + require.NoError(t, err) + resRcp := results[i].Receipt(0) + + assert.Equal(t, txs[i].Hash(), tx.Hash()) + assert.Equal(t, txs[i].To(), tx.To()) + assert.Equal(t, blockHash, rcp.BlockHash) + assert.Equal(t, block.Height, rcp.BlockNumber.Uint64()) + assert.Equal(t, resRcp.Status, rcp.Status) + assert.Equal(t, cumulative, rcp.CumulativeGasUsed) + assert.Equal(t, tx.Hash(), rcp.TxHash) + assert.Equal(t, uint(i), rcp.TransactionIndex) + + for _, l := range rcp.Logs { + assert.Equal(t, tx.Hash(), l.TxHash) + assert.Equal(t, block.Height, l.BlockNumber) + assert.Equal(t, rcp.TransactionIndex, l.Index) + } + + cumulative += uint64(1) // we make each tx use 1 gas, so cumulative just adds 1 + } +} + +func newTransaction(nonce uint64) (Transaction, *types.Result, flow.Event, error) { + tx := gethTypes.NewTransaction(nonce, gethCommon.HexToAddress("0x1"), big.NewInt(10), uint64(100), big.NewInt(123), nil) + res := &types.Result{ + VMError: nil, + TxType: tx.Type(), + GasConsumed: 1, + DeployedContractAddress: &types.Address{0x5, 0x6, 0x7}, + ReturnedData: []byte{0x55}, + Logs: []*gethTypes.Log{{ + Address: gethCommon.Address{0x1, 0x2}, + Topics: []gethCommon.Hash{{0x5, 0x6}, {0x7, 0x8}}, + }, { + Address: gethCommon.Address{0x3, 0x5}, + Topics: []gethCommon.Hash{{0x2, 0x66}, {0x7, 0x1}}, + }}, + TxHash: tx.Hash(), + } + + txEncoded, err := tx.MarshalBinary() + if err != nil { + return nil, nil, flow.Event{}, err + } + + ev := events.NewTransactionEvent( + res, + txEncoded, + 1, + ) + + cdcEv, err := ev.Payload.ToCadence(flowGo.Previewnet) + if err != nil { + return nil, nil, flow.Event{}, err + } + + flowEvent := flow.Event{ + Type: string(ev.Etype), + Value: cdcEv, + } + + return TransactionCall{Transaction: tx}, res, flowEvent, err +} + +func newBlock(height uint64, hashes []gethCommon.Hash) (*Block, flow.Event, error) { gethBlock := types.NewBlock(gethCommon.HexToHash("0x01"), height, uint64(1337), big.NewInt(100)) - evmBlock := &Block{Block: gethBlock} + evmBlock := &Block{ + Block: gethBlock, + TransactionHashes: hashes, + } + ev := events.NewBlockEvent(gethBlock) cadenceEvent, err := ev.Payload.ToCadence(flowGo.Previewnet) From 6412459fd16cf50123eae04f362e55dff4ca5071 Mon Sep 17 00:00:00 2001 From: Ardit Marku Date: Thu, 25 Jul 2024 11:41:18 +0300 Subject: [PATCH 41/55] Fixes for flow-go breaking changes --- go.mod | 8 +-- go.sum | 12 ++-- models/events_test.go | 2 +- models/receipt.go | 5 ++ models/transaction.go | 4 +- services/logs/filter.go | 16 +++-- services/logs/filter_test.go | 9 ++- storage/index.go | 3 +- storage/index_testsuite.go | 46 +++++++++------ storage/mocks/ReceiptIndexer.go | 29 +++------ storage/pebble/receipts.go | 23 +++++--- tests/go.mod | 10 ++-- tests/go.sum | 20 ++++--- tests/web3js/config.js | 2 +- .../eth_deploy_contract_and_interact_test.js | 16 ++--- tests/web3js/eth_non_interactive_test.js | 59 ++++++++++--------- tests/web3js/eth_revert_reason_test.js | 4 +- 17 files changed, 144 insertions(+), 124 deletions(-) diff --git a/go.mod b/go.mod index ecbff6e8..28f2909c 100644 --- a/go.mod +++ b/go.mod @@ -8,13 +8,14 @@ require ( github.com/goccy/go-json v0.10.2 github.com/google/uuid v1.6.0 github.com/onflow/atree v0.7.0-rc.2 - github.com/onflow/cadence v1.0.0-preview.38 - github.com/onflow/flow-go v0.36.3-0.20240723132958-6ce4c85fdbcb - github.com/onflow/flow-go-sdk v1.0.0-preview.41 + github.com/onflow/cadence v1.0.0-preview.39 + github.com/onflow/flow-go v0.36.4-0.20240724205438-14f9fddeda2b + github.com/onflow/flow-go-sdk v1.0.0-preview.42 github.com/onflow/flow/protobuf/go/flow v0.4.5 github.com/onflow/go-ethereum v1.14.7 github.com/rs/cors v1.8.0 github.com/rs/zerolog v1.31.0 + github.com/samber/slog-zerolog v1.0.0 github.com/sethvargo/go-limiter v1.0.0 github.com/sethvargo/go-retry v0.2.3 github.com/stretchr/testify v1.9.0 @@ -155,7 +156,6 @@ require ( github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/samber/lo v1.39.0 // indirect - github.com/samber/slog-zerolog v1.0.0 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/slok/go-http-metrics v0.10.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect diff --git a/go.sum b/go.sum index c9f4fd04..25a457e5 100644 --- a/go.sum +++ b/go.sum @@ -1848,8 +1848,8 @@ github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs github.com/onflow/atree v0.7.0-rc.2 h1:mZmVrl/zPlfI44EjV3FdR2QwIqT8nz1sCONUBFcML/U= github.com/onflow/atree v0.7.0-rc.2/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM= github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= -github.com/onflow/cadence v1.0.0-preview.38 h1:Ag3V1YCErma9ZF+eaNq602Vv2lBI3ScaMUcUOFj81GQ= -github.com/onflow/cadence v1.0.0-preview.38/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0= +github.com/onflow/cadence v1.0.0-preview.39 h1:BDx+hO4THUW6cDN11tqVtBx8hFSUErjQkw/WDAGs0C4= +github.com/onflow/cadence v1.0.0-preview.39/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0= github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/crypto v0.25.1 h1:0txy2PKPMM873JbpxQNbJmuOJtD56bfs48RQfm0ts5A= github.com/onflow/crypto v0.25.1/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= @@ -1861,11 +1861,11 @@ github.com/onflow/flow-ft/lib/go/contracts v1.0.0 h1:mToacZ5NWqtlWwk/7RgIl/jeKB/ github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= github.com/onflow/flow-ft/lib/go/templates v1.0.0 h1:6cMS/lUJJ17HjKBfMO/eh0GGvnpElPgBXx7h5aoWJhs= github.com/onflow/flow-ft/lib/go/templates v1.0.0/go.mod h1:uQ8XFqmMK2jxyBSVrmyuwdWjTEb+6zGjRYotfDJ5pAE= -github.com/onflow/flow-go v0.36.3-0.20240723132958-6ce4c85fdbcb h1:s8Upr7xv/Tm2LMtc8FLH7ZZ/db5L/yhPU9MFGVpjr74= -github.com/onflow/flow-go v0.36.3-0.20240723132958-6ce4c85fdbcb/go.mod h1:NKttW0i0DlJYxddJoyR+E4sukr8MeCiNvtSadnZrXjY= +github.com/onflow/flow-go v0.36.4-0.20240724205438-14f9fddeda2b h1:hgna3jsW/w9WcY7I5P19pU9882iCm2BM2nJMY3SDyRE= +github.com/onflow/flow-go v0.36.4-0.20240724205438-14f9fddeda2b/go.mod h1:OGWZcM13nXoqBF3nyv5en/NVtBN9e5zJe4eLV1dzXSE= github.com/onflow/flow-go-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo= -github.com/onflow/flow-go-sdk v1.0.0-preview.41 h1:pOUAIQdlWuc90tQzYixCXkqmnoorDgsFxTu2J1wlhHA= -github.com/onflow/flow-go-sdk v1.0.0-preview.41/go.mod h1:FyJiLluqK+sNo+ky9VU6HSwVkvhv5/fKH1sIKI1yrrI= +github.com/onflow/flow-go-sdk v1.0.0-preview.42 h1:XcHWRQfkJ5A24sNqnmo3DocHdf5ulDJLie9/yh5c1Y4= +github.com/onflow/flow-go-sdk v1.0.0-preview.42/go.mod h1:4/ELH5ooEdZ+9tZfoiTIkkB4B6wVgy4HbMjS/9w/67Q= github.com/onflow/flow-nft/lib/go/contracts v1.2.1 h1:woAAS5z651sDpi7ihAHll8NvRS9uFXIXkL6xR+bKFZY= github.com/onflow/flow-nft/lib/go/contracts v1.2.1/go.mod h1:2gpbza+uzs1k7x31hkpBPlggIRkI53Suo0n2AyA2HcE= github.com/onflow/flow-nft/lib/go/templates v1.2.0 h1:JSQyh9rg0RC+D1930BiRXN8lrtMs+ubVMK6aQPon6Yc= diff --git a/models/events_test.go b/models/events_test.go index 94e13cfc..7524d072 100644 --- a/models/events_test.go +++ b/models/events_test.go @@ -107,7 +107,7 @@ func Test_EventDecoding(t *testing.T) { rcp := cadenceEvents.Receipts()[i] blockHash, err := block.Hash() require.NoError(t, err) - resRcp := results[i].Receipt(0) + resRcp := results[i].Receipt() assert.Equal(t, txs[i].Hash(), tx.Hash()) assert.Equal(t, txs[i].To(), tx.To()) diff --git a/models/receipt.go b/models/receipt.go index 1e890843..626dd9ac 100644 --- a/models/receipt.go +++ b/models/receipt.go @@ -171,3 +171,8 @@ func MarshalReceipt( return fields, nil } + +type BloomsHeight struct { + Blooms []*gethTypes.Bloom + Height *big.Int +} diff --git a/models/transaction.go b/models/transaction.go index 1642f79a..141477ce 100644 --- a/models/transaction.go +++ b/models/transaction.go @@ -16,13 +16,13 @@ import ( ) const ( - // txSlotSize is used to calculate how many data slots a single transaction + // TxSlotSize is used to calculate how many data slots a single transaction // takes up based on its size. The slots are used as DoS protection, ensuring // that validating a new transaction remains a constant operation (in reality // O(maxslots), where max slots are 4 currently). TxSlotSize = 32 * 1024 - // txMaxSize is the maximum size a single transaction can have. This field has + // TxMaxSize is the maximum size a single transaction can have. This field has // non-trivial consequences: larger transactions are significantly harder and // more expensive to propagate; larger transactions also take more resources // to validate whether they fit into the pool or not. diff --git a/services/logs/filter.go b/services/logs/filter.go index c5179305..02a17352 100644 --- a/services/logs/filter.go +++ b/services/logs/filter.go @@ -77,23 +77,21 @@ func NewRangeFilter( } func (r *RangeFilter) Match() ([]*gethTypes.Log, error) { - blooms, heights, err := r.receipts.BloomsForBlockRange(r.start, r.end) + bloomsHeight, err := r.receipts.BloomsForBlockRange(r.start, r.end) if err != nil { return nil, err } - if len(blooms) != len(heights) { - return nil, fmt.Errorf("bloom values don't match height values") // this should never happen - } - logs := make([]*gethTypes.Log, 0) - for i, bloom := range blooms { - if !bloomMatch(*bloom, r.criteria) { - continue + for _, bloomHeight := range bloomsHeight { + for _, bloom := range bloomHeight.Blooms { + if !bloomMatch(*bloom, r.criteria) { + continue + } } // todo do this concurrently - receipts, err := r.receipts.GetByBlockHeight(heights[i]) + receipts, err := r.receipts.GetByBlockHeight(bloomHeight.Height) if err != nil { return nil, err } diff --git a/services/logs/filter_test.go b/services/logs/filter_test.go index 6c1cba84..53be1fc0 100644 --- a/services/logs/filter_test.go +++ b/services/logs/filter_test.go @@ -135,18 +135,23 @@ func receiptStorage() storage.ReceiptIndexer { receiptStorage. On("BloomsForBlockRange", mock.AnythingOfType("*big.Int"), mock.AnythingOfType("*big.Int")). - Return(func(start, end *big.Int) ([]*gethTypes.Bloom, []*big.Int, error) { + Return(func(start, end *big.Int) ([]*models.BloomsHeight, error) { blooms := make([]*gethTypes.Bloom, 0) heights := make([]*big.Int, 0) + bloomsHeight := make([]*models.BloomsHeight, 0) for _, r := range receipts { if r.BlockNumber.Cmp(start) >= 0 && r.BlockNumber.Cmp(end) <= 0 { blooms = append(blooms, &r.Bloom) heights = append(heights, r.BlockNumber) + bloomsHeight = append(bloomsHeight, &models.BloomsHeight{ + Blooms: blooms, + Height: r.BlockNumber, + }) } } - return blooms, heights, nil + return bloomsHeight, nil }) return receiptStorage diff --git a/storage/index.go b/storage/index.go index a04b7f08..f91181d8 100644 --- a/storage/index.go +++ b/storage/index.go @@ -7,7 +7,6 @@ import ( "github.com/goccy/go-json" "github.com/onflow/flow-go-sdk" "github.com/onflow/go-ethereum/common" - gethTypes "github.com/onflow/go-ethereum/core/types" "github.com/onflow/flow-evm-gateway/models" ) @@ -84,7 +83,7 @@ type ReceiptIndexer interface { // inclusive start and end block height. // Expected errors: // - errors.InvalidRange if the block by the height was not indexed or if the end and start values are invalid. - BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, []*big.Int, error) + BloomsForBlockRange(start, end *big.Int) ([]*models.BloomsHeight, error) } type TransactionIndexer interface { diff --git a/storage/index_testsuite.go b/storage/index_testsuite.go index a3e14243..5ac29e70 100644 --- a/storage/index_testsuite.go +++ b/storage/index_testsuite.go @@ -246,25 +246,33 @@ func (s *ReceiptTestSuite) TestBloomsForBlockRange() { start := big.NewInt(10) end := big.NewInt(15) testBlooms := make([]*types.Bloom, 0) + testHeights := make([]*big.Int, 0) for i := start.Uint64(); i < end.Uint64(); i++ { r := mocks.NewReceipt(i, common.HexToHash(fmt.Sprintf("0xf1%d", i))) testBlooms = append(testBlooms, &r.Bloom) + testHeights = append(testHeights, big.NewInt(int64(i))) err := s.ReceiptIndexer.Store(r, nil) s.Require().NoError(err) } - blooms, heights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + bloomsHeights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().NoError(err) - s.Require().Len(blooms, len(testBlooms)) - s.Require().Len(heights, len(testBlooms)) - s.Require().Equal(testBlooms, blooms) + s.Require().Len(bloomsHeights, len(testBlooms)) + for i, bloomHeight := range bloomsHeights { + s.Require().Len(bloomHeight.Blooms, 1) + s.Require().Equal(bloomHeight.Blooms[0], testBlooms[i]) + s.Require().Equal(bloomHeight.Height, testHeights[i]) + } - blooms, heights, err = s.ReceiptIndexer.BloomsForBlockRange(start, big.NewInt(13)) + bloomsHeights, err = s.ReceiptIndexer.BloomsForBlockRange(start, big.NewInt(13)) s.Require().NoError(err) - s.Require().Len(blooms, 4) - s.Require().Len(heights, 4) - s.Require().Equal(testBlooms[0:4], blooms) + s.Require().Len(bloomsHeights, 4) + for i := 0; i < 4; i++ { + s.Require().Len(bloomsHeights[i].Blooms, 1) + s.Require().Equal(bloomsHeights[i].Blooms[0], testBlooms[i]) + s.Require().Equal(bloomsHeights[i].Height, testHeights[i]) + } }) s.Run("valid block range with multiple receipts per block", func() { @@ -282,29 +290,31 @@ func (s *ReceiptTestSuite) TestBloomsForBlockRange() { testHeights = append(testHeights, big.NewInt(int64(i))) } - blooms, heights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + bloomsHeights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().NoError(err) - s.Require().Len(blooms, len(testBlooms)) - s.Require().Len(heights, len(testHeights)) - s.Require().Equal(testBlooms, blooms) + s.Require().Len(bloomsHeights, len(testBlooms)/2) + for i, bloomHeight := range bloomsHeights { + s.Require().Len(bloomHeight.Blooms, 2) + s.Require().Equal(bloomHeight.Blooms[0], testBlooms[i]) + s.Require().Equal(bloomHeight.Blooms[1], testBlooms[i+1]) + s.Require().Equal(bloomHeight.Height, testHeights[i]) + } }) s.Run("invalid block range", func() { start := big.NewInt(10) end := big.NewInt(5) // end is less than start - blooms, heights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + bloomsHeights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().ErrorIs(err, errors.ErrInvalidRange) - s.Require().Nil(heights) - s.Require().Nil(blooms) + s.Require().Nil(bloomsHeights) }) s.Run("non-existing block range", func() { start := big.NewInt(100) end := big.NewInt(105) - blooms, heights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + bloomsHeights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().ErrorIs(err, errors.ErrInvalidRange) - s.Require().Nil(blooms) - s.Require().Nil(heights) + s.Require().Nil(bloomsHeights) }) } diff --git a/storage/mocks/ReceiptIndexer.go b/storage/mocks/ReceiptIndexer.go index b44a9dbd..5053aa22 100644 --- a/storage/mocks/ReceiptIndexer.go +++ b/storage/mocks/ReceiptIndexer.go @@ -11,8 +11,6 @@ import ( models "github.com/onflow/flow-evm-gateway/models" pebble "github.com/cockroachdb/pebble" - - types "github.com/onflow/go-ethereum/core/types" ) // ReceiptIndexer is an autogenerated mock type for the ReceiptIndexer type @@ -21,42 +19,33 @@ type ReceiptIndexer struct { } // BloomsForBlockRange provides a mock function with given fields: start, end -func (_m *ReceiptIndexer) BloomsForBlockRange(start *big.Int, end *big.Int) ([]*types.Bloom, []*big.Int, error) { +func (_m *ReceiptIndexer) BloomsForBlockRange(start *big.Int, end *big.Int) ([]*models.BloomsHeight, error) { ret := _m.Called(start, end) if len(ret) == 0 { panic("no return value specified for BloomsForBlockRange") } - var r0 []*types.Bloom - var r1 []*big.Int - var r2 error - if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) ([]*types.Bloom, []*big.Int, error)); ok { + var r0 []*models.BloomsHeight + var r1 error + if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) ([]*models.BloomsHeight, error)); ok { return rf(start, end) } - if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) []*types.Bloom); ok { + if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) []*models.BloomsHeight); ok { r0 = rf(start, end) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]*types.Bloom) + r0 = ret.Get(0).([]*models.BloomsHeight) } } - if rf, ok := ret.Get(1).(func(*big.Int, *big.Int) []*big.Int); ok { + if rf, ok := ret.Get(1).(func(*big.Int, *big.Int) error); ok { r1 = rf(start, end) } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).([]*big.Int) - } - } - - if rf, ok := ret.Get(2).(func(*big.Int, *big.Int) error); ok { - r2 = rf(start, end) - } else { - r2 = ret.Error(2) + r1 = ret.Error(1) } - return r0, r1, r2 + return r0, r1 } // GetByBlockHeight provides a mock function with given fields: height diff --git a/storage/pebble/receipts.go b/storage/pebble/receipts.go index bf55fa02..a9547db9 100644 --- a/storage/pebble/receipts.go +++ b/storage/pebble/receipts.go @@ -197,22 +197,22 @@ func (r *Receipts) getBloomsByBlockHeight(height []byte, batch *pebble.Batch) ([ return blooms, nil } -func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, []*big.Int, error) { +func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*models.BloomsHeight, error) { r.mux.RLock() defer r.mux.RUnlock() if start.Cmp(end) > 0 { - return nil, nil, fmt.Errorf("start is bigger than end: %w", errs.ErrInvalidRange) + return nil, fmt.Errorf("start is bigger than end: %w", errs.ErrInvalidRange) } // make sure the first and last height are within indexed values last, err := r.getLast() if err != nil { - return nil, nil, fmt.Errorf("failed getting first and last height: %w", err) + return nil, fmt.Errorf("failed getting first and last height: %w", err) } if start.Uint64() > last { - return nil, nil, fmt.Errorf( + return nil, fmt.Errorf( "start value %d is not within the indexed range of [0 - %d]: %w", start, last, @@ -221,7 +221,7 @@ func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, } if end.Uint64() > last { - return nil, nil, fmt.Errorf( + return nil, fmt.Errorf( "end value %d is not within the indexed range of [0 - %d]: %w", end, last, @@ -236,7 +236,7 @@ func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, UpperBound: makePrefix(bloomHeightKey, endInclusive.Bytes()), // exclusive }) if err != nil { - return nil, nil, err + return nil, err } defer func() { err := iterator.Close() @@ -247,16 +247,17 @@ func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, blooms := make([]*gethTypes.Bloom, 0) heights := make([]*big.Int, 0) + result := make([]*models.BloomsHeight, 0) for iterator.First(); iterator.Valid(); iterator.Next() { val, err := iterator.ValueAndErr() if err != nil { - return nil, nil, err + return nil, err } var bloomsHeight []*gethTypes.Bloom if err := rlp.DecodeBytes(val, &bloomsHeight); err != nil { - return nil, nil, fmt.Errorf("failed to decode blooms: %w", err) + return nil, fmt.Errorf("failed to decode blooms: %w", err) } h := stripPrefix(iterator.Key()) @@ -264,9 +265,13 @@ func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, blooms = append(blooms, bloomsHeight...) heights = append(heights, height) + result = append(result, &models.BloomsHeight{ + Blooms: bloomsHeight, + Height: height, + }) } - return blooms, heights, nil + return result, nil } func (r *Receipts) getLast() (uint64, error) { diff --git a/tests/go.mod b/tests/go.mod index 43f08e5e..b78267bf 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -4,12 +4,12 @@ go 1.22 require ( github.com/goccy/go-json v0.10.2 - github.com/onflow/cadence v1.0.0-preview.38 + github.com/onflow/cadence v1.0.0-preview.39 github.com/onflow/crypto v0.25.1 - github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240723143120-d2b220e499c4 + github.com/onflow/flow-emulator v1.0.0-preview.36 github.com/onflow/flow-evm-gateway v0.0.0-20240201154855-4d4d3d3f19c7 - github.com/onflow/flow-go v0.36.3-0.20240723132958-6ce4c85fdbcb - github.com/onflow/flow-go-sdk v1.0.0-preview.41 + github.com/onflow/flow-go v0.36.4-0.20240724205438-14f9fddeda2b + github.com/onflow/flow-go-sdk v1.0.0-preview.42 github.com/onflow/go-ethereum v1.14.7 github.com/rs/zerolog v1.31.0 github.com/stretchr/testify v1.9.0 @@ -170,6 +170,8 @@ require ( github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/rs/cors v1.8.0 // indirect + github.com/samber/lo v1.39.0 // indirect + github.com/samber/slog-zerolog v1.0.0 // indirect github.com/schollz/progressbar/v3 v3.13.1 // indirect github.com/sethvargo/go-limiter v1.0.0 // indirect github.com/sethvargo/go-retry v0.2.3 // indirect diff --git a/tests/go.sum b/tests/go.sum index 96539e0a..6171856d 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -2075,8 +2075,8 @@ github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs github.com/onflow/atree v0.7.0-rc.2 h1:mZmVrl/zPlfI44EjV3FdR2QwIqT8nz1sCONUBFcML/U= github.com/onflow/atree v0.7.0-rc.2/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM= github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= -github.com/onflow/cadence v1.0.0-preview.38 h1:Ag3V1YCErma9ZF+eaNq602Vv2lBI3ScaMUcUOFj81GQ= -github.com/onflow/cadence v1.0.0-preview.38/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0= +github.com/onflow/cadence v1.0.0-preview.39 h1:BDx+hO4THUW6cDN11tqVtBx8hFSUErjQkw/WDAGs0C4= +github.com/onflow/cadence v1.0.0-preview.39/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0= github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/crypto v0.25.1 h1:0txy2PKPMM873JbpxQNbJmuOJtD56bfs48RQfm0ts5A= github.com/onflow/crypto v0.25.1/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= @@ -2084,17 +2084,17 @@ github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 h1:q9tXLIALwQ76bO4 github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 h1:FfhMBAb78p6VAWkJ+iqdKLErGQVQgxk5w6DP5ZruWX8= github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= -github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240723143120-d2b220e499c4 h1:SjDUF/0piWLU0VhKq88S37OVn5OiLwpsFacHIWZjpdY= -github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240723143120-d2b220e499c4/go.mod h1:udqQTmpyghFJEFJgCAYMNxayjNMmxjTsucpu1N+7y5k= +github.com/onflow/flow-emulator v1.0.0-preview.36 h1:XCBWo6XNcnejxw17Qz8lmHW1fzwzApbrm4nxWp09yt4= +github.com/onflow/flow-emulator v1.0.0-preview.36/go.mod h1:ngGgic4WYQzlW7esXgGQOpm1Berfar6q+z3qbDQ8ay8= github.com/onflow/flow-ft/lib/go/contracts v1.0.0 h1:mToacZ5NWqtlWwk/7RgIl/jeKB/Sy/tIXdw90yKHcV0= github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= github.com/onflow/flow-ft/lib/go/templates v1.0.0 h1:6cMS/lUJJ17HjKBfMO/eh0GGvnpElPgBXx7h5aoWJhs= github.com/onflow/flow-ft/lib/go/templates v1.0.0/go.mod h1:uQ8XFqmMK2jxyBSVrmyuwdWjTEb+6zGjRYotfDJ5pAE= -github.com/onflow/flow-go v0.36.3-0.20240723132958-6ce4c85fdbcb h1:s8Upr7xv/Tm2LMtc8FLH7ZZ/db5L/yhPU9MFGVpjr74= -github.com/onflow/flow-go v0.36.3-0.20240723132958-6ce4c85fdbcb/go.mod h1:NKttW0i0DlJYxddJoyR+E4sukr8MeCiNvtSadnZrXjY= +github.com/onflow/flow-go v0.36.4-0.20240724205438-14f9fddeda2b h1:hgna3jsW/w9WcY7I5P19pU9882iCm2BM2nJMY3SDyRE= +github.com/onflow/flow-go v0.36.4-0.20240724205438-14f9fddeda2b/go.mod h1:OGWZcM13nXoqBF3nyv5en/NVtBN9e5zJe4eLV1dzXSE= github.com/onflow/flow-go-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo= -github.com/onflow/flow-go-sdk v1.0.0-preview.41 h1:pOUAIQdlWuc90tQzYixCXkqmnoorDgsFxTu2J1wlhHA= -github.com/onflow/flow-go-sdk v1.0.0-preview.41/go.mod h1:FyJiLluqK+sNo+ky9VU6HSwVkvhv5/fKH1sIKI1yrrI= +github.com/onflow/flow-go-sdk v1.0.0-preview.42 h1:XcHWRQfkJ5A24sNqnmo3DocHdf5ulDJLie9/yh5c1Y4= +github.com/onflow/flow-go-sdk v1.0.0-preview.42/go.mod h1:4/ELH5ooEdZ+9tZfoiTIkkB4B6wVgy4HbMjS/9w/67Q= github.com/onflow/flow-nft/lib/go/contracts v1.2.1 h1:woAAS5z651sDpi7ihAHll8NvRS9uFXIXkL6xR+bKFZY= github.com/onflow/flow-nft/lib/go/contracts v1.2.1/go.mod h1:2gpbza+uzs1k7x31hkpBPlggIRkI53Suo0n2AyA2HcE= github.com/onflow/flow-nft/lib/go/templates v1.2.0 h1:JSQyh9rg0RC+D1930BiRXN8lrtMs+ubVMK6aQPon6Yc= @@ -2272,6 +2272,10 @@ github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfF github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samber/lo v1.39.0 h1:4gTz1wUhNYLhFSKl6O+8peW0v2F4BCY034GRpU9WnuA= +github.com/samber/lo v1.39.0/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= +github.com/samber/slog-zerolog v1.0.0 h1:YpRy0xux1uJr0Ng3wrEjv9nyvb4RAoNqkS611UjzeG8= +github.com/samber/slog-zerolog v1.0.0/go.mod h1:N2/g/mNGRY1zqsydIYE0uKipSSFsPDjytoVkRnZ0Jp0= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/schollz/progressbar/v3 v3.13.1 h1:o8rySDYiQ59Mwzy2FELeHY5ZARXZTVJC7iHD6PEFUiE= github.com/schollz/progressbar/v3 v3.13.1/go.mod h1:xvrbki8kfT1fzWzBT/UZd9L6GA+jdL7HAgq2RFnO6fQ= diff --git a/tests/web3js/config.js b/tests/web3js/config.js index 96c9cac5..19e1511c 100644 --- a/tests/web3js/config.js +++ b/tests/web3js/config.js @@ -6,7 +6,7 @@ module.exports = { web3: web3, eoa: web3.eth.accounts.privateKeyToAccount("0xf6d5333177711e562cabf1f311916196ee6ffc2a07966d9d4628094073bd5442"), fundedAmount: 5.0, - startBlockHeight: 3n, // start block height after setup accounts + startBlockHeight: 2n, // start block height after setup accounts serviceEOA: "0xfacf71692421039876a5bb4f10ef7a439d8ef61e", // configured account as gw service successStatus: 1n } diff --git a/tests/web3js/eth_deploy_contract_and_interact_test.js b/tests/web3js/eth_deploy_contract_and_interact_test.js index 1af80287..ce511388 100644 --- a/tests/web3js/eth_deploy_contract_and_interact_test.js +++ b/tests/web3js/eth_deploy_contract_and_interact_test.js @@ -3,7 +3,7 @@ const conf = require('./config') const helpers = require('./helpers') const web3 = conf.web3 -it('deploy contract and interact', async() => { +it('deploy contract and interact', async () => { let deployed = await helpers.deployContract("storage") let contractAddress = deployed.receipt.contractAddress @@ -43,7 +43,7 @@ it('deploy contract and interact', async() => { // get the default deployed value on contract const initValue = 1337 let callRetrieve = await deployed.contract.methods.retrieve().encodeABI() - result = await web3.eth.call({to: contractAddress, data: callRetrieve}, "latest") + result = await web3.eth.call({ to: contractAddress, data: callRetrieve }, "latest") assert.equal(result, initValue) // set the value on the contract, to its current value @@ -59,7 +59,7 @@ it('deploy contract and interact', async() => { assert.equal(res.receipt.status, conf.successStatus) // check the new value on contract - result = await web3.eth.call({to: contractAddress, data: callRetrieve}, "latest") + result = await web3.eth.call({ to: contractAddress, data: callRetrieve }, "latest") assert.equal(result, initValue) // update the value on the contract @@ -76,7 +76,7 @@ it('deploy contract and interact', async() => { assert.equal(res.receipt.status, conf.successStatus) // check the new value on contract - result = await web3.eth.call({to: contractAddress, data: callRetrieve}, "latest") + result = await web3.eth.call({ to: contractAddress, data: callRetrieve }, "latest") assert.equal(result, newValue) // make sure receipts and txs are indexed @@ -87,7 +87,7 @@ it('deploy contract and interact', async() => { assert.equal(updateTx.data, updateData) // check that call can handle specific block heights - result = await web3.eth.call({to: contractAddress, data: callRetrieve}, latestHeight - 1n) + result = await web3.eth.call({ to: contractAddress, data: callRetrieve }, latestHeight - 1n) assert.equal(result, initValue) // submit a transaction that emits logs @@ -127,14 +127,14 @@ it('deploy contract and interact', async() => { // check that revert reason for custom error is correctly returned for contract call // and it is properly ABI decoded. try { - result = await deployed.contract.methods.customError().call({from: conf.eoa.address}) + result = await deployed.contract.methods.customError().call({ from: conf.eoa.address }) } catch (err) { let error = err.innerError assert.equal( error.data, '0x9195785a00000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001056616c756520697320746f6f206c6f7700000000000000000000000000000000' ) - assert.equal(error.errorName,'MyCustomError') + assert.equal(error.errorName, 'MyCustomError') assert.equal(error.errorSignature, 'MyCustomError(uint256,string)') assert.equal(error.errorArgs.value, 5n) assert.equal(error.errorArgs.message, 'Value is too low') @@ -162,7 +162,7 @@ it('deploy contract and interact', async() => { // check that assertion error is correctly returned for contract call // and it is properly ABI decoded. try { - result = await deployed.contract.methods.assertError().call({from: conf.eoa.address}) + result = await deployed.contract.methods.assertError().call({ from: conf.eoa.address }) } catch (err) { let error = err.innerError assert.equal( diff --git a/tests/web3js/eth_non_interactive_test.js b/tests/web3js/eth_non_interactive_test.js index 8b44986c..0a46dd29 100644 --- a/tests/web3js/eth_non_interactive_test.js +++ b/tests/web3js/eth_non_interactive_test.js @@ -5,6 +5,7 @@ const web3 = conf.web3 it('get chain ID', async () => { let chainID = await web3.eth.getChainId() + assert.isDefined(chainID) assert.equal(chainID, 646n) }) @@ -28,18 +29,21 @@ it('get block', async () => { let txCount = await web3.eth.getBlockTransactionCount(conf.startBlockHeight) let uncleCount = await web3.eth.getBlockUncleCount(conf.startBlockHeight) - assert.equal(txCount, 1n) + assert.equal(txCount, 3n) assert.equal(uncleCount, 0n) - // get block transaction - let tx = await web3.eth.getTransactionFromBlock(conf.startBlockHeight, 0) - assert.isNotNull(tx) - assert.equal(tx.blockNumber, block.number) - assert.equal(tx.blockHash, block.hash) - assert.isString(tx.hash) + // get block transactions + for (const txIndex of [0, 1, 2]) { + let tx = await web3.eth.getTransactionFromBlock(conf.startBlockHeight, txIndex) + assert.isNotNull(tx) + assert.equal(tx.blockNumber, block.number) + assert.equal(tx.blockHash, block.hash) + assert.isString(tx.hash) + assert.equal(tx.transactionIndex, txIndex) + } // not existing transaction - let no = await web3.eth.getTransactionFromBlock(conf.startBlockHeight, 1) + let no = await web3.eth.getTransactionFromBlock(conf.startBlockHeight, 5) assert.isNull(no) }) @@ -57,17 +61,15 @@ it('get earliest/genesis block', async () => { }) it('get block and transactions with COA interactions', async () => { - // First 2 blocks are formed from COA deployment and fund. - const blockNumbers = [1, 2] - - for (const blockNumber of blockNumbers) { - let block = await web3.eth.getBlock(blockNumber) - assert.notDeepEqual(block, {}) + let block = await web3.eth.getBlock(conf.startBlockHeight) + assert.notDeepEqual(block, {}) + for (const txIndex of [0, 1]) { // get block transaction - let tx = await web3.eth.getTransactionFromBlock(block.number, 0) + let tx = await web3.eth.getTransactionFromBlock(block.number, txIndex) // Assert that the transaction type is `0`, the type of `LegacyTx`. assert.equal(tx.type, 0n) + assert.equal(tx.transactionIndex, txIndex) // get transaction receipt let receipt = await web3.eth.getTransactionReceipt(tx.hash) @@ -75,19 +77,20 @@ it('get block and transactions with COA interactions', async () => { assert.equal(receipt.type, 0n) if (receipt.contractAddress != null) { assert.equal(receipt.gasUsed, 702600n) + assert.equal(receipt.cumulativeGasUsed, 702600n) } else { assert.equal(receipt.gasUsed, 21055n) + assert.equal(receipt.cumulativeGasUsed, 723655n) } - assert.equal(receipt.gasUsed, receipt.cumulativeGasUsed) } // get block transaction - let tx = await web3.eth.getTransactionFromBlock(1n, 0) + let tx = await web3.eth.getTransactionFromBlock(2n, 0) assert.equal(tx.v, "0xff") assert.equal(tx.r, "0x0000000000000000000000000000000000000000000000020000000000000000") assert.equal(tx.s, "0x0000000000000000000000000000000000000000000000000000000000000004") - tx = await web3.eth.getTransactionFromBlock(2n, 0) + tx = await web3.eth.getTransactionFromBlock(2n, 1) assert.equal(tx.v, "0xff") assert.equal(tx.r, "0x0000000000000000000000000000000000000000000000010000000000000000") assert.equal(tx.s, "0x0000000000000000000000000000000000000000000000000000000000000001") @@ -120,7 +123,7 @@ it('get gas price', async () => { }) it('get transaction', async () => { - let blockTx = await web3.eth.getTransactionFromBlock(conf.startBlockHeight, 0) + let blockTx = await web3.eth.getTransactionFromBlock(conf.startBlockHeight, 2) assert.isNotNull(blockTx) let tx = await web3.eth.getTransaction(blockTx.hash) @@ -131,7 +134,7 @@ it('get transaction', async () => { assert.isNotEmpty(tx.from) assert.isNotEmpty(tx.r) assert.isNotEmpty(tx.s) - assert.equal(tx.transactionIndex, 0) + assert.equal(tx.transactionIndex, 2) let rcp = await web3.eth.getTransactionReceipt(tx.hash) assert.isNotEmpty(rcp) @@ -140,7 +143,7 @@ it('get transaction', async () => { assert.equal(rcp.from, tx.from) assert.equal(rcp.to, tx.to) assert.equal(rcp.gasUsed, 21000n) - assert.equal(rcp.gasUsed, rcp.cumulativeGasUsed) + assert.equal(rcp.cumulativeGasUsed, 744655n) assert.equal(rcp.transactionHash, tx.hash) assert.equal(rcp.status, conf.successStatus) }) @@ -163,7 +166,7 @@ it('get syncing status', async () => { assert.equal(height, conf.startBlockHeight) let syncInfo = await web3.eth.isSyncing() - // conf.startBlockHeight = 3n + // conf.startBlockHeight = 2n assert.equal(syncInfo.startingBlock, height) assert.equal(syncInfo.currentBlock, height) assert.equal(syncInfo.highestBlock, height) @@ -212,7 +215,7 @@ it('can make batch requests', async () => { assert.deepEqual( results[0], - { jsonrpc: '2.0', id: 1, result: '0x3' } + { jsonrpc: '2.0', id: 1, result: '0x2' } ) assert.deepEqual( results[1], @@ -223,7 +226,7 @@ it('can make batch requests', async () => { { jsonrpc: '2.0', id: 3, - result: { startingBlock: '0x3', currentBlock: '0x3', highestBlock: '0x3' } + result: { startingBlock: '0x2', currentBlock: '0x2', highestBlock: '0x2' } } ) assert.deepEqual( @@ -232,7 +235,7 @@ it('can make batch requests', async () => { ) assert.deepEqual( results[4], - { jsonrpc: '2.0', id: 5, result: '0x1' } + { jsonrpc: '2.0', id: 5, result: '0x3' } ) // The maximum number of batch requests is 5, @@ -260,9 +263,9 @@ it('get fee history', async () => { response, { oldestBlock: 1n, - reward: [['0x0'], ['0x0'], ['0x0']], // gas price is always 0 during testing - baseFeePerGas: [0n, 0n, 0n], - gasUsedRatio: [0.04684, 0.0014036666666666666, 0.0014] + reward: [['0x0'], ['0x0']], // gas price is always 0 during testing + baseFeePerGas: [0n, 0n], + gasUsedRatio: [0, 0.04964366666666667] } ) }) diff --git a/tests/web3js/eth_revert_reason_test.js b/tests/web3js/eth_revert_reason_test.js index 6e840d26..bbc4ba74 100644 --- a/tests/web3js/eth_revert_reason_test.js +++ b/tests/web3js/eth_revert_reason_test.js @@ -43,7 +43,7 @@ it('store revertReason field in transaction receipts', async () => { let latestHeight = await web3.eth.getBlockNumber() let block = await web3.eth.getBlock(latestHeight) - assert.equal(block.number, 5n) + assert.equal(block.number, 4n) let revertedTx = await web3.eth.getTransactionFromBlock(latestHeight, 0) // Give some time to the engine to ingest the latest transaction @@ -77,7 +77,7 @@ it('store revertReason field in transaction receipts', async () => { latestHeight = await web3.eth.getBlockNumber() block = await web3.eth.getBlock(latestHeight) - assert.equal(block.number, 6n) + assert.equal(block.number, 5n) revertedTx = await web3.eth.getTransactionFromBlock(latestHeight, 0) // Give some time to the engine to ingest the latest transaction From c9612a951ef0fd9beba2e688de0d1f2b88359ee5 Mon Sep 17 00:00:00 2001 From: Ardit Marku Date: Thu, 25 Jul 2024 11:45:49 +0300 Subject: [PATCH 42/55] Update CI workflow to run for PRs on every branch --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6775151..cb472458 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: CI on: pull_request: - branches: [main, gregor/dev] push: - branches: [main, gregor/dev] + branches: + - "main" jobs: test: From e1dc0586e9be363d288ad32bc1182d385eb87b87 Mon Sep 17 00:00:00 2001 From: Ardit Marku Date: Thu, 25 Jul 2024 11:58:04 +0300 Subject: [PATCH 43/55] Fix linting issues --- models/events_test.go | 1 + services/logs/filter_test.go | 2 -- storage/pebble/receipts.go | 10 +++------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/models/events_test.go b/models/events_test.go index 7524d072..37526084 100644 --- a/models/events_test.go +++ b/models/events_test.go @@ -87,6 +87,7 @@ func Test_EventDecoding(t *testing.T) { // generate single block block, blockEvent, err := newBlock(1, hashes) + require.NoError(t, err) blockEvents.Events = append(blockEvents.Events, blockEvent) cadenceEvents, err := NewCadenceEvents(blockEvents) diff --git a/services/logs/filter_test.go b/services/logs/filter_test.go index 53be1fc0..832bb1b3 100644 --- a/services/logs/filter_test.go +++ b/services/logs/filter_test.go @@ -137,13 +137,11 @@ func receiptStorage() storage.ReceiptIndexer { On("BloomsForBlockRange", mock.AnythingOfType("*big.Int"), mock.AnythingOfType("*big.Int")). Return(func(start, end *big.Int) ([]*models.BloomsHeight, error) { blooms := make([]*gethTypes.Bloom, 0) - heights := make([]*big.Int, 0) bloomsHeight := make([]*models.BloomsHeight, 0) for _, r := range receipts { if r.BlockNumber.Cmp(start) >= 0 && r.BlockNumber.Cmp(end) <= 0 { blooms = append(blooms, &r.Bloom) - heights = append(heights, r.BlockNumber) bloomsHeight = append(bloomsHeight, &models.BloomsHeight{ Blooms: blooms, Height: r.BlockNumber, diff --git a/storage/pebble/receipts.go b/storage/pebble/receipts.go index a9547db9..538c134e 100644 --- a/storage/pebble/receipts.go +++ b/storage/pebble/receipts.go @@ -245,9 +245,7 @@ func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*models.BloomsHei } }() - blooms := make([]*gethTypes.Bloom, 0) - heights := make([]*big.Int, 0) - result := make([]*models.BloomsHeight, 0) + bloomsHeights := make([]*models.BloomsHeight, 0) for iterator.First(); iterator.Valid(); iterator.Next() { val, err := iterator.ValueAndErr() @@ -263,15 +261,13 @@ func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*models.BloomsHei h := stripPrefix(iterator.Key()) height := new(big.Int).SetBytes(h) - blooms = append(blooms, bloomsHeight...) - heights = append(heights, height) - result = append(result, &models.BloomsHeight{ + bloomsHeights = append(bloomsHeights, &models.BloomsHeight{ Blooms: bloomsHeight, Height: height, }) } - return result, nil + return bloomsHeights, nil } func (r *Receipts) getLast() (uint64, error) { From 7aa20e38100db5d27fa32f64cde9eae61641763d Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Thu, 25 Jul 2024 15:08:22 +0200 Subject: [PATCH 44/55] skip e2e test for execution data unless provided --- services/requester/remote_state_test.go | 26 ++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/services/requester/remote_state_test.go b/services/requester/remote_state_test.go index 68c6e3e6..c4e9d42f 100644 --- a/services/requester/remote_state_test.go +++ b/services/requester/remote_state_test.go @@ -3,6 +3,7 @@ package requester import ( "context" "encoding/hex" + "os" "testing" "github.com/onflow/flow-go/fvm/evm/emulator/state" @@ -16,7 +17,12 @@ import ( ) func Test_E2E_Previewnet_RemoteLedger(t *testing.T) { - ledger, err := newPreviewnetLedger() + executionAPI := os.Getenv("E2E_EXECUTION_API") // "access-001.previewnet1.nodes.onflow.org:9000" + if executionAPI == "" { + t.Skip() + } + + ledger, err := newPreviewnetLedger(executionAPI) require.NoError(t, err) // this is a pre-established test account on previewnet @@ -40,15 +46,19 @@ Testing from local machine (bottleneck is network delay to previewnet AN) Benchmark_RemoteLedger_GetBalance-8 9 1144204361 ns/op */ func Benchmark_RemoteLedger_GetBalance(b *testing.B) { - const previewnetHost = "access-001.previewnet1.nodes.onflow.org:9000" - cadenceHeight, err := getPreviewnetLatestHeight(previewnetHost) + executionAPI := os.Getenv("E2E_EXECUTION_API") // "access-001.previewnet1.nodes.onflow.org:9000" + if executionAPI == "" { + b.Skip() + } + + cadenceHeight, err := getPreviewnetLatestHeight(executionAPI) require.NoError(b, err) // we have to include ledger creation since the loading of the collection // will be done only once per height, all the subsequent requests for // getting the balance will work on already loaded state and thus be fast for i := 0; i < b.N; i++ { - ledger, err := newRemoteLedger(previewnetHost, cadenceHeight) + ledger, err := newRemoteLedger(executionAPI, cadenceHeight) require.NoError(b, err) stateDB, err := state.NewStateDB(ledger, previewnetStorageAddress) @@ -62,15 +72,13 @@ func Benchmark_RemoteLedger_GetBalance(b *testing.B) { } } -func newPreviewnetLedger() (*remoteLedger, error) { - const previewnetHost = "access-001.previewnet1.nodes.onflow.org:9000" - - cadenceHeight, err := getPreviewnetLatestHeight(previewnetHost) +func newPreviewnetLedger(host string) (*remoteLedger, error) { + cadenceHeight, err := getPreviewnetLatestHeight(host) if err != nil { return nil, err } - return newRemoteLedger(previewnetHost, cadenceHeight) + return newRemoteLedger(host, cadenceHeight) } func getPreviewnetLatestHeight(host string) (uint64, error) { From f85beaedc1015a684a5667de530bf05221feb38d Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Thu, 25 Jul 2024 15:18:48 +0200 Subject: [PATCH 45/55] temp revert bloom height --- models/receipt.go | 5 ---- services/logs/filter.go | 16 +++++++----- services/logs/filter_test.go | 11 +++----- storage/index.go | 3 ++- storage/index_testsuite.go | 46 +++++++++++++-------------------- storage/mocks/ReceiptIndexer.go | 29 ++++++++++++++------- storage/pebble/receipts.go | 27 ++++++++++--------- 7 files changed, 66 insertions(+), 71 deletions(-) diff --git a/models/receipt.go b/models/receipt.go index 626dd9ac..1e890843 100644 --- a/models/receipt.go +++ b/models/receipt.go @@ -171,8 +171,3 @@ func MarshalReceipt( return fields, nil } - -type BloomsHeight struct { - Blooms []*gethTypes.Bloom - Height *big.Int -} diff --git a/services/logs/filter.go b/services/logs/filter.go index 02a17352..c5179305 100644 --- a/services/logs/filter.go +++ b/services/logs/filter.go @@ -77,21 +77,23 @@ func NewRangeFilter( } func (r *RangeFilter) Match() ([]*gethTypes.Log, error) { - bloomsHeight, err := r.receipts.BloomsForBlockRange(r.start, r.end) + blooms, heights, err := r.receipts.BloomsForBlockRange(r.start, r.end) if err != nil { return nil, err } + if len(blooms) != len(heights) { + return nil, fmt.Errorf("bloom values don't match height values") // this should never happen + } + logs := make([]*gethTypes.Log, 0) - for _, bloomHeight := range bloomsHeight { - for _, bloom := range bloomHeight.Blooms { - if !bloomMatch(*bloom, r.criteria) { - continue - } + for i, bloom := range blooms { + if !bloomMatch(*bloom, r.criteria) { + continue } // todo do this concurrently - receipts, err := r.receipts.GetByBlockHeight(bloomHeight.Height) + receipts, err := r.receipts.GetByBlockHeight(heights[i]) if err != nil { return nil, err } diff --git a/services/logs/filter_test.go b/services/logs/filter_test.go index 832bb1b3..6c1cba84 100644 --- a/services/logs/filter_test.go +++ b/services/logs/filter_test.go @@ -135,21 +135,18 @@ func receiptStorage() storage.ReceiptIndexer { receiptStorage. On("BloomsForBlockRange", mock.AnythingOfType("*big.Int"), mock.AnythingOfType("*big.Int")). - Return(func(start, end *big.Int) ([]*models.BloomsHeight, error) { + Return(func(start, end *big.Int) ([]*gethTypes.Bloom, []*big.Int, error) { blooms := make([]*gethTypes.Bloom, 0) - bloomsHeight := make([]*models.BloomsHeight, 0) + heights := make([]*big.Int, 0) for _, r := range receipts { if r.BlockNumber.Cmp(start) >= 0 && r.BlockNumber.Cmp(end) <= 0 { blooms = append(blooms, &r.Bloom) - bloomsHeight = append(bloomsHeight, &models.BloomsHeight{ - Blooms: blooms, - Height: r.BlockNumber, - }) + heights = append(heights, r.BlockNumber) } } - return bloomsHeight, nil + return blooms, heights, nil }) return receiptStorage diff --git a/storage/index.go b/storage/index.go index f91181d8..a04b7f08 100644 --- a/storage/index.go +++ b/storage/index.go @@ -7,6 +7,7 @@ import ( "github.com/goccy/go-json" "github.com/onflow/flow-go-sdk" "github.com/onflow/go-ethereum/common" + gethTypes "github.com/onflow/go-ethereum/core/types" "github.com/onflow/flow-evm-gateway/models" ) @@ -83,7 +84,7 @@ type ReceiptIndexer interface { // inclusive start and end block height. // Expected errors: // - errors.InvalidRange if the block by the height was not indexed or if the end and start values are invalid. - BloomsForBlockRange(start, end *big.Int) ([]*models.BloomsHeight, error) + BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, []*big.Int, error) } type TransactionIndexer interface { diff --git a/storage/index_testsuite.go b/storage/index_testsuite.go index 5ac29e70..a3e14243 100644 --- a/storage/index_testsuite.go +++ b/storage/index_testsuite.go @@ -246,33 +246,25 @@ func (s *ReceiptTestSuite) TestBloomsForBlockRange() { start := big.NewInt(10) end := big.NewInt(15) testBlooms := make([]*types.Bloom, 0) - testHeights := make([]*big.Int, 0) for i := start.Uint64(); i < end.Uint64(); i++ { r := mocks.NewReceipt(i, common.HexToHash(fmt.Sprintf("0xf1%d", i))) testBlooms = append(testBlooms, &r.Bloom) - testHeights = append(testHeights, big.NewInt(int64(i))) err := s.ReceiptIndexer.Store(r, nil) s.Require().NoError(err) } - bloomsHeights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + blooms, heights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().NoError(err) - s.Require().Len(bloomsHeights, len(testBlooms)) - for i, bloomHeight := range bloomsHeights { - s.Require().Len(bloomHeight.Blooms, 1) - s.Require().Equal(bloomHeight.Blooms[0], testBlooms[i]) - s.Require().Equal(bloomHeight.Height, testHeights[i]) - } + s.Require().Len(blooms, len(testBlooms)) + s.Require().Len(heights, len(testBlooms)) + s.Require().Equal(testBlooms, blooms) - bloomsHeights, err = s.ReceiptIndexer.BloomsForBlockRange(start, big.NewInt(13)) + blooms, heights, err = s.ReceiptIndexer.BloomsForBlockRange(start, big.NewInt(13)) s.Require().NoError(err) - s.Require().Len(bloomsHeights, 4) - for i := 0; i < 4; i++ { - s.Require().Len(bloomsHeights[i].Blooms, 1) - s.Require().Equal(bloomsHeights[i].Blooms[0], testBlooms[i]) - s.Require().Equal(bloomsHeights[i].Height, testHeights[i]) - } + s.Require().Len(blooms, 4) + s.Require().Len(heights, 4) + s.Require().Equal(testBlooms[0:4], blooms) }) s.Run("valid block range with multiple receipts per block", func() { @@ -290,31 +282,29 @@ func (s *ReceiptTestSuite) TestBloomsForBlockRange() { testHeights = append(testHeights, big.NewInt(int64(i))) } - bloomsHeights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + blooms, heights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().NoError(err) - s.Require().Len(bloomsHeights, len(testBlooms)/2) - for i, bloomHeight := range bloomsHeights { - s.Require().Len(bloomHeight.Blooms, 2) - s.Require().Equal(bloomHeight.Blooms[0], testBlooms[i]) - s.Require().Equal(bloomHeight.Blooms[1], testBlooms[i+1]) - s.Require().Equal(bloomHeight.Height, testHeights[i]) - } + s.Require().Len(blooms, len(testBlooms)) + s.Require().Len(heights, len(testHeights)) + s.Require().Equal(testBlooms, blooms) }) s.Run("invalid block range", func() { start := big.NewInt(10) end := big.NewInt(5) // end is less than start - bloomsHeights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + blooms, heights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().ErrorIs(err, errors.ErrInvalidRange) - s.Require().Nil(bloomsHeights) + s.Require().Nil(heights) + s.Require().Nil(blooms) }) s.Run("non-existing block range", func() { start := big.NewInt(100) end := big.NewInt(105) - bloomsHeights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + blooms, heights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().ErrorIs(err, errors.ErrInvalidRange) - s.Require().Nil(bloomsHeights) + s.Require().Nil(blooms) + s.Require().Nil(heights) }) } diff --git a/storage/mocks/ReceiptIndexer.go b/storage/mocks/ReceiptIndexer.go index 5053aa22..b44a9dbd 100644 --- a/storage/mocks/ReceiptIndexer.go +++ b/storage/mocks/ReceiptIndexer.go @@ -11,6 +11,8 @@ import ( models "github.com/onflow/flow-evm-gateway/models" pebble "github.com/cockroachdb/pebble" + + types "github.com/onflow/go-ethereum/core/types" ) // ReceiptIndexer is an autogenerated mock type for the ReceiptIndexer type @@ -19,33 +21,42 @@ type ReceiptIndexer struct { } // BloomsForBlockRange provides a mock function with given fields: start, end -func (_m *ReceiptIndexer) BloomsForBlockRange(start *big.Int, end *big.Int) ([]*models.BloomsHeight, error) { +func (_m *ReceiptIndexer) BloomsForBlockRange(start *big.Int, end *big.Int) ([]*types.Bloom, []*big.Int, error) { ret := _m.Called(start, end) if len(ret) == 0 { panic("no return value specified for BloomsForBlockRange") } - var r0 []*models.BloomsHeight - var r1 error - if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) ([]*models.BloomsHeight, error)); ok { + var r0 []*types.Bloom + var r1 []*big.Int + var r2 error + if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) ([]*types.Bloom, []*big.Int, error)); ok { return rf(start, end) } - if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) []*models.BloomsHeight); ok { + if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) []*types.Bloom); ok { r0 = rf(start, end) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]*models.BloomsHeight) + r0 = ret.Get(0).([]*types.Bloom) } } - if rf, ok := ret.Get(1).(func(*big.Int, *big.Int) error); ok { + if rf, ok := ret.Get(1).(func(*big.Int, *big.Int) []*big.Int); ok { r1 = rf(start, end) } else { - r1 = ret.Error(1) + if ret.Get(1) != nil { + r1 = ret.Get(1).([]*big.Int) + } } - return r0, r1 + if rf, ok := ret.Get(2).(func(*big.Int, *big.Int) error); ok { + r2 = rf(start, end) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 } // GetByBlockHeight provides a mock function with given fields: height diff --git a/storage/pebble/receipts.go b/storage/pebble/receipts.go index 538c134e..bf55fa02 100644 --- a/storage/pebble/receipts.go +++ b/storage/pebble/receipts.go @@ -197,22 +197,22 @@ func (r *Receipts) getBloomsByBlockHeight(height []byte, batch *pebble.Batch) ([ return blooms, nil } -func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*models.BloomsHeight, error) { +func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, []*big.Int, error) { r.mux.RLock() defer r.mux.RUnlock() if start.Cmp(end) > 0 { - return nil, fmt.Errorf("start is bigger than end: %w", errs.ErrInvalidRange) + return nil, nil, fmt.Errorf("start is bigger than end: %w", errs.ErrInvalidRange) } // make sure the first and last height are within indexed values last, err := r.getLast() if err != nil { - return nil, fmt.Errorf("failed getting first and last height: %w", err) + return nil, nil, fmt.Errorf("failed getting first and last height: %w", err) } if start.Uint64() > last { - return nil, fmt.Errorf( + return nil, nil, fmt.Errorf( "start value %d is not within the indexed range of [0 - %d]: %w", start, last, @@ -221,7 +221,7 @@ func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*models.BloomsHei } if end.Uint64() > last { - return nil, fmt.Errorf( + return nil, nil, fmt.Errorf( "end value %d is not within the indexed range of [0 - %d]: %w", end, last, @@ -236,7 +236,7 @@ func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*models.BloomsHei UpperBound: makePrefix(bloomHeightKey, endInclusive.Bytes()), // exclusive }) if err != nil { - return nil, err + return nil, nil, err } defer func() { err := iterator.Close() @@ -245,29 +245,28 @@ func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*models.BloomsHei } }() - bloomsHeights := make([]*models.BloomsHeight, 0) + blooms := make([]*gethTypes.Bloom, 0) + heights := make([]*big.Int, 0) for iterator.First(); iterator.Valid(); iterator.Next() { val, err := iterator.ValueAndErr() if err != nil { - return nil, err + return nil, nil, err } var bloomsHeight []*gethTypes.Bloom if err := rlp.DecodeBytes(val, &bloomsHeight); err != nil { - return nil, fmt.Errorf("failed to decode blooms: %w", err) + return nil, nil, fmt.Errorf("failed to decode blooms: %w", err) } h := stripPrefix(iterator.Key()) height := new(big.Int).SetBytes(h) - bloomsHeights = append(bloomsHeights, &models.BloomsHeight{ - Blooms: bloomsHeight, - Height: height, - }) + blooms = append(blooms, bloomsHeight...) + heights = append(heights, height) } - return bloomsHeights, nil + return blooms, heights, nil } func (r *Receipts) getLast() (uint64, error) { From 122621473852cd25bf243c9e5b1f0db2bf255f2b Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Thu, 25 Jul 2024 15:57:55 +0200 Subject: [PATCH 46/55] Revert "temp revert bloom height" This reverts commit f85beaedc1015a684a5667de530bf05221feb38d. --- models/receipt.go | 5 ++++ services/logs/filter.go | 16 +++++------- services/logs/filter_test.go | 11 +++++--- storage/index.go | 3 +-- storage/index_testsuite.go | 46 ++++++++++++++++++++------------- storage/mocks/ReceiptIndexer.go | 29 +++++++-------------- storage/pebble/receipts.go | 27 +++++++++---------- 7 files changed, 71 insertions(+), 66 deletions(-) diff --git a/models/receipt.go b/models/receipt.go index 1e890843..626dd9ac 100644 --- a/models/receipt.go +++ b/models/receipt.go @@ -171,3 +171,8 @@ func MarshalReceipt( return fields, nil } + +type BloomsHeight struct { + Blooms []*gethTypes.Bloom + Height *big.Int +} diff --git a/services/logs/filter.go b/services/logs/filter.go index c5179305..02a17352 100644 --- a/services/logs/filter.go +++ b/services/logs/filter.go @@ -77,23 +77,21 @@ func NewRangeFilter( } func (r *RangeFilter) Match() ([]*gethTypes.Log, error) { - blooms, heights, err := r.receipts.BloomsForBlockRange(r.start, r.end) + bloomsHeight, err := r.receipts.BloomsForBlockRange(r.start, r.end) if err != nil { return nil, err } - if len(blooms) != len(heights) { - return nil, fmt.Errorf("bloom values don't match height values") // this should never happen - } - logs := make([]*gethTypes.Log, 0) - for i, bloom := range blooms { - if !bloomMatch(*bloom, r.criteria) { - continue + for _, bloomHeight := range bloomsHeight { + for _, bloom := range bloomHeight.Blooms { + if !bloomMatch(*bloom, r.criteria) { + continue + } } // todo do this concurrently - receipts, err := r.receipts.GetByBlockHeight(heights[i]) + receipts, err := r.receipts.GetByBlockHeight(bloomHeight.Height) if err != nil { return nil, err } diff --git a/services/logs/filter_test.go b/services/logs/filter_test.go index 6c1cba84..832bb1b3 100644 --- a/services/logs/filter_test.go +++ b/services/logs/filter_test.go @@ -135,18 +135,21 @@ func receiptStorage() storage.ReceiptIndexer { receiptStorage. On("BloomsForBlockRange", mock.AnythingOfType("*big.Int"), mock.AnythingOfType("*big.Int")). - Return(func(start, end *big.Int) ([]*gethTypes.Bloom, []*big.Int, error) { + Return(func(start, end *big.Int) ([]*models.BloomsHeight, error) { blooms := make([]*gethTypes.Bloom, 0) - heights := make([]*big.Int, 0) + bloomsHeight := make([]*models.BloomsHeight, 0) for _, r := range receipts { if r.BlockNumber.Cmp(start) >= 0 && r.BlockNumber.Cmp(end) <= 0 { blooms = append(blooms, &r.Bloom) - heights = append(heights, r.BlockNumber) + bloomsHeight = append(bloomsHeight, &models.BloomsHeight{ + Blooms: blooms, + Height: r.BlockNumber, + }) } } - return blooms, heights, nil + return bloomsHeight, nil }) return receiptStorage diff --git a/storage/index.go b/storage/index.go index a04b7f08..f91181d8 100644 --- a/storage/index.go +++ b/storage/index.go @@ -7,7 +7,6 @@ import ( "github.com/goccy/go-json" "github.com/onflow/flow-go-sdk" "github.com/onflow/go-ethereum/common" - gethTypes "github.com/onflow/go-ethereum/core/types" "github.com/onflow/flow-evm-gateway/models" ) @@ -84,7 +83,7 @@ type ReceiptIndexer interface { // inclusive start and end block height. // Expected errors: // - errors.InvalidRange if the block by the height was not indexed or if the end and start values are invalid. - BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, []*big.Int, error) + BloomsForBlockRange(start, end *big.Int) ([]*models.BloomsHeight, error) } type TransactionIndexer interface { diff --git a/storage/index_testsuite.go b/storage/index_testsuite.go index a3e14243..5ac29e70 100644 --- a/storage/index_testsuite.go +++ b/storage/index_testsuite.go @@ -246,25 +246,33 @@ func (s *ReceiptTestSuite) TestBloomsForBlockRange() { start := big.NewInt(10) end := big.NewInt(15) testBlooms := make([]*types.Bloom, 0) + testHeights := make([]*big.Int, 0) for i := start.Uint64(); i < end.Uint64(); i++ { r := mocks.NewReceipt(i, common.HexToHash(fmt.Sprintf("0xf1%d", i))) testBlooms = append(testBlooms, &r.Bloom) + testHeights = append(testHeights, big.NewInt(int64(i))) err := s.ReceiptIndexer.Store(r, nil) s.Require().NoError(err) } - blooms, heights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + bloomsHeights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().NoError(err) - s.Require().Len(blooms, len(testBlooms)) - s.Require().Len(heights, len(testBlooms)) - s.Require().Equal(testBlooms, blooms) + s.Require().Len(bloomsHeights, len(testBlooms)) + for i, bloomHeight := range bloomsHeights { + s.Require().Len(bloomHeight.Blooms, 1) + s.Require().Equal(bloomHeight.Blooms[0], testBlooms[i]) + s.Require().Equal(bloomHeight.Height, testHeights[i]) + } - blooms, heights, err = s.ReceiptIndexer.BloomsForBlockRange(start, big.NewInt(13)) + bloomsHeights, err = s.ReceiptIndexer.BloomsForBlockRange(start, big.NewInt(13)) s.Require().NoError(err) - s.Require().Len(blooms, 4) - s.Require().Len(heights, 4) - s.Require().Equal(testBlooms[0:4], blooms) + s.Require().Len(bloomsHeights, 4) + for i := 0; i < 4; i++ { + s.Require().Len(bloomsHeights[i].Blooms, 1) + s.Require().Equal(bloomsHeights[i].Blooms[0], testBlooms[i]) + s.Require().Equal(bloomsHeights[i].Height, testHeights[i]) + } }) s.Run("valid block range with multiple receipts per block", func() { @@ -282,29 +290,31 @@ func (s *ReceiptTestSuite) TestBloomsForBlockRange() { testHeights = append(testHeights, big.NewInt(int64(i))) } - blooms, heights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + bloomsHeights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().NoError(err) - s.Require().Len(blooms, len(testBlooms)) - s.Require().Len(heights, len(testHeights)) - s.Require().Equal(testBlooms, blooms) + s.Require().Len(bloomsHeights, len(testBlooms)/2) + for i, bloomHeight := range bloomsHeights { + s.Require().Len(bloomHeight.Blooms, 2) + s.Require().Equal(bloomHeight.Blooms[0], testBlooms[i]) + s.Require().Equal(bloomHeight.Blooms[1], testBlooms[i+1]) + s.Require().Equal(bloomHeight.Height, testHeights[i]) + } }) s.Run("invalid block range", func() { start := big.NewInt(10) end := big.NewInt(5) // end is less than start - blooms, heights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + bloomsHeights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().ErrorIs(err, errors.ErrInvalidRange) - s.Require().Nil(heights) - s.Require().Nil(blooms) + s.Require().Nil(bloomsHeights) }) s.Run("non-existing block range", func() { start := big.NewInt(100) end := big.NewInt(105) - blooms, heights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) + bloomsHeights, err := s.ReceiptIndexer.BloomsForBlockRange(start, end) s.Require().ErrorIs(err, errors.ErrInvalidRange) - s.Require().Nil(blooms) - s.Require().Nil(heights) + s.Require().Nil(bloomsHeights) }) } diff --git a/storage/mocks/ReceiptIndexer.go b/storage/mocks/ReceiptIndexer.go index b44a9dbd..5053aa22 100644 --- a/storage/mocks/ReceiptIndexer.go +++ b/storage/mocks/ReceiptIndexer.go @@ -11,8 +11,6 @@ import ( models "github.com/onflow/flow-evm-gateway/models" pebble "github.com/cockroachdb/pebble" - - types "github.com/onflow/go-ethereum/core/types" ) // ReceiptIndexer is an autogenerated mock type for the ReceiptIndexer type @@ -21,42 +19,33 @@ type ReceiptIndexer struct { } // BloomsForBlockRange provides a mock function with given fields: start, end -func (_m *ReceiptIndexer) BloomsForBlockRange(start *big.Int, end *big.Int) ([]*types.Bloom, []*big.Int, error) { +func (_m *ReceiptIndexer) BloomsForBlockRange(start *big.Int, end *big.Int) ([]*models.BloomsHeight, error) { ret := _m.Called(start, end) if len(ret) == 0 { panic("no return value specified for BloomsForBlockRange") } - var r0 []*types.Bloom - var r1 []*big.Int - var r2 error - if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) ([]*types.Bloom, []*big.Int, error)); ok { + var r0 []*models.BloomsHeight + var r1 error + if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) ([]*models.BloomsHeight, error)); ok { return rf(start, end) } - if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) []*types.Bloom); ok { + if rf, ok := ret.Get(0).(func(*big.Int, *big.Int) []*models.BloomsHeight); ok { r0 = rf(start, end) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]*types.Bloom) + r0 = ret.Get(0).([]*models.BloomsHeight) } } - if rf, ok := ret.Get(1).(func(*big.Int, *big.Int) []*big.Int); ok { + if rf, ok := ret.Get(1).(func(*big.Int, *big.Int) error); ok { r1 = rf(start, end) } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).([]*big.Int) - } - } - - if rf, ok := ret.Get(2).(func(*big.Int, *big.Int) error); ok { - r2 = rf(start, end) - } else { - r2 = ret.Error(2) + r1 = ret.Error(1) } - return r0, r1, r2 + return r0, r1 } // GetByBlockHeight provides a mock function with given fields: height diff --git a/storage/pebble/receipts.go b/storage/pebble/receipts.go index bf55fa02..538c134e 100644 --- a/storage/pebble/receipts.go +++ b/storage/pebble/receipts.go @@ -197,22 +197,22 @@ func (r *Receipts) getBloomsByBlockHeight(height []byte, batch *pebble.Batch) ([ return blooms, nil } -func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, []*big.Int, error) { +func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*models.BloomsHeight, error) { r.mux.RLock() defer r.mux.RUnlock() if start.Cmp(end) > 0 { - return nil, nil, fmt.Errorf("start is bigger than end: %w", errs.ErrInvalidRange) + return nil, fmt.Errorf("start is bigger than end: %w", errs.ErrInvalidRange) } // make sure the first and last height are within indexed values last, err := r.getLast() if err != nil { - return nil, nil, fmt.Errorf("failed getting first and last height: %w", err) + return nil, fmt.Errorf("failed getting first and last height: %w", err) } if start.Uint64() > last { - return nil, nil, fmt.Errorf( + return nil, fmt.Errorf( "start value %d is not within the indexed range of [0 - %d]: %w", start, last, @@ -221,7 +221,7 @@ func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, } if end.Uint64() > last { - return nil, nil, fmt.Errorf( + return nil, fmt.Errorf( "end value %d is not within the indexed range of [0 - %d]: %w", end, last, @@ -236,7 +236,7 @@ func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, UpperBound: makePrefix(bloomHeightKey, endInclusive.Bytes()), // exclusive }) if err != nil { - return nil, nil, err + return nil, err } defer func() { err := iterator.Close() @@ -245,28 +245,29 @@ func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*gethTypes.Bloom, } }() - blooms := make([]*gethTypes.Bloom, 0) - heights := make([]*big.Int, 0) + bloomsHeights := make([]*models.BloomsHeight, 0) for iterator.First(); iterator.Valid(); iterator.Next() { val, err := iterator.ValueAndErr() if err != nil { - return nil, nil, err + return nil, err } var bloomsHeight []*gethTypes.Bloom if err := rlp.DecodeBytes(val, &bloomsHeight); err != nil { - return nil, nil, fmt.Errorf("failed to decode blooms: %w", err) + return nil, fmt.Errorf("failed to decode blooms: %w", err) } h := stripPrefix(iterator.Key()) height := new(big.Int).SetBytes(h) - blooms = append(blooms, bloomsHeight...) - heights = append(heights, height) + bloomsHeights = append(bloomsHeights, &models.BloomsHeight{ + Blooms: bloomsHeight, + Height: height, + }) } - return blooms, heights, nil + return bloomsHeights, nil } func (r *Receipts) getLast() (uint64, error) { From 078937111f466b2412808aa236e4d7a17717389a Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Thu, 25 Jul 2024 15:59:21 +0200 Subject: [PATCH 47/55] add commented test --- tests/web3js/eth_logs_filtering_test.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/web3js/eth_logs_filtering_test.js b/tests/web3js/eth_logs_filtering_test.js index 893570e7..6327e3a9 100644 --- a/tests/web3js/eth_logs_filtering_test.js +++ b/tests/web3js/eth_logs_filtering_test.js @@ -76,7 +76,6 @@ it('emit logs and retrieve them using different filters', async() => { }) assert.lengthOf(events, 0) - /* todo fails but shouldn't // filter by value A being 1 or -1 events = await deployed.contract.getPastEvents('Calculated', { filter: { numA: [-1, 1] }, @@ -86,8 +85,4 @@ it('emit logs and retrieve them using different filters', async() => { assert.lengthOf(events, 2) assert.equal(events[0].returnValues.numB, 2) assert.equal(events[1].returnValues.numB, -2) - - // todo compose more complex topic filters using OR and AND logic - */ - }) From d88958c511315da9de125cb3a124dfd8538de93d Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:02:21 +0200 Subject: [PATCH 48/55] add more fields and index --- models/events.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/models/events.go b/models/events.go index 797fd215..704b0fdc 100644 --- a/models/events.go +++ b/models/events.go @@ -53,6 +53,7 @@ func NewCadenceEvents(events flow.BlockEvents) (*CadenceEvents, error) { return nil, err } + logIndex := uint(0) // todo revisit if we can reconstruct it simply like this for i, rcp := range e.receipts { // add transaction hashes to the block e.block.TransactionHashes = append(e.block.TransactionHashes, rcp.TxHash) @@ -65,9 +66,13 @@ func NewCadenceEvents(events flow.BlockEvents) (*CadenceEvents, error) { rcp.BlockHash = blockHash // dynamically add missing log fields for _, l := range rcp.Logs { - l.TxHash = rcp.TxHash l.BlockNumber = rcp.BlockNumber.Uint64() - l.Index = rcp.TransactionIndex + l.BlockHash = rcp.BlockHash + l.TxHash = rcp.TxHash + l.TxIndex = rcp.TransactionIndex + l.Index = logIndex + l.Removed = false + logIndex++ } } From 094c2a8575b936cfd84782faa6e4be846f65dd97 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:08:47 +0200 Subject: [PATCH 49/55] fix changes in logs --- models/events_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/models/events_test.go b/models/events_test.go index 37526084..7af6d6ab 100644 --- a/models/events_test.go +++ b/models/events_test.go @@ -103,6 +103,7 @@ func Test_EventDecoding(t *testing.T) { require.Equal(t, txCount, len(cadenceEvents.Transactions())) cumulative := uint64(1) + logIndex := uint(0) for i := 0; i < txCount; i++ { tx := cadenceEvents.Transactions()[i] rcp := cadenceEvents.Receipts()[i] @@ -122,7 +123,9 @@ func Test_EventDecoding(t *testing.T) { for _, l := range rcp.Logs { assert.Equal(t, tx.Hash(), l.TxHash) assert.Equal(t, block.Height, l.BlockNumber) - assert.Equal(t, rcp.TransactionIndex, l.Index) + assert.Equal(t, rcp.TransactionIndex, l.TxIndex) + assert.Equal(t, logIndex, l.Index) + logIndex++ } cumulative += uint64(1) // we make each tx use 1 gas, so cumulative just adds 1 From 9471d72862b73104be3cd84b33c243e5809d0aa7 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:16:38 +0200 Subject: [PATCH 50/55] update flow-go v0.36.4 --- go.mod | 2 +- go.sum | 4 ++-- tests/go.mod | 2 +- tests/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 28f2909c..98ef5c3c 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/google/uuid v1.6.0 github.com/onflow/atree v0.7.0-rc.2 github.com/onflow/cadence v1.0.0-preview.39 - github.com/onflow/flow-go v0.36.4-0.20240724205438-14f9fddeda2b + github.com/onflow/flow-go v0.36.4 github.com/onflow/flow-go-sdk v1.0.0-preview.42 github.com/onflow/flow/protobuf/go/flow v0.4.5 github.com/onflow/go-ethereum v1.14.7 diff --git a/go.sum b/go.sum index 25a457e5..b5464197 100644 --- a/go.sum +++ b/go.sum @@ -1861,8 +1861,8 @@ github.com/onflow/flow-ft/lib/go/contracts v1.0.0 h1:mToacZ5NWqtlWwk/7RgIl/jeKB/ github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= github.com/onflow/flow-ft/lib/go/templates v1.0.0 h1:6cMS/lUJJ17HjKBfMO/eh0GGvnpElPgBXx7h5aoWJhs= github.com/onflow/flow-ft/lib/go/templates v1.0.0/go.mod h1:uQ8XFqmMK2jxyBSVrmyuwdWjTEb+6zGjRYotfDJ5pAE= -github.com/onflow/flow-go v0.36.4-0.20240724205438-14f9fddeda2b h1:hgna3jsW/w9WcY7I5P19pU9882iCm2BM2nJMY3SDyRE= -github.com/onflow/flow-go v0.36.4-0.20240724205438-14f9fddeda2b/go.mod h1:OGWZcM13nXoqBF3nyv5en/NVtBN9e5zJe4eLV1dzXSE= +github.com/onflow/flow-go v0.36.4 h1:T4678J5Ib6z2spIolhKCgDIUznxW7dNiJq1bzDntS9k= +github.com/onflow/flow-go v0.36.4/go.mod h1:OGWZcM13nXoqBF3nyv5en/NVtBN9e5zJe4eLV1dzXSE= github.com/onflow/flow-go-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo= github.com/onflow/flow-go-sdk v1.0.0-preview.42 h1:XcHWRQfkJ5A24sNqnmo3DocHdf5ulDJLie9/yh5c1Y4= github.com/onflow/flow-go-sdk v1.0.0-preview.42/go.mod h1:4/ELH5ooEdZ+9tZfoiTIkkB4B6wVgy4HbMjS/9w/67Q= diff --git a/tests/go.mod b/tests/go.mod index b78267bf..531d7572 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -8,7 +8,7 @@ require ( github.com/onflow/crypto v0.25.1 github.com/onflow/flow-emulator v1.0.0-preview.36 github.com/onflow/flow-evm-gateway v0.0.0-20240201154855-4d4d3d3f19c7 - github.com/onflow/flow-go v0.36.4-0.20240724205438-14f9fddeda2b + github.com/onflow/flow-go v0.36.4 github.com/onflow/flow-go-sdk v1.0.0-preview.42 github.com/onflow/go-ethereum v1.14.7 github.com/rs/zerolog v1.31.0 diff --git a/tests/go.sum b/tests/go.sum index 6171856d..d2b7dac3 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -2090,8 +2090,8 @@ github.com/onflow/flow-ft/lib/go/contracts v1.0.0 h1:mToacZ5NWqtlWwk/7RgIl/jeKB/ github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= github.com/onflow/flow-ft/lib/go/templates v1.0.0 h1:6cMS/lUJJ17HjKBfMO/eh0GGvnpElPgBXx7h5aoWJhs= github.com/onflow/flow-ft/lib/go/templates v1.0.0/go.mod h1:uQ8XFqmMK2jxyBSVrmyuwdWjTEb+6zGjRYotfDJ5pAE= -github.com/onflow/flow-go v0.36.4-0.20240724205438-14f9fddeda2b h1:hgna3jsW/w9WcY7I5P19pU9882iCm2BM2nJMY3SDyRE= -github.com/onflow/flow-go v0.36.4-0.20240724205438-14f9fddeda2b/go.mod h1:OGWZcM13nXoqBF3nyv5en/NVtBN9e5zJe4eLV1dzXSE= +github.com/onflow/flow-go v0.36.4 h1:T4678J5Ib6z2spIolhKCgDIUznxW7dNiJq1bzDntS9k= +github.com/onflow/flow-go v0.36.4/go.mod h1:OGWZcM13nXoqBF3nyv5en/NVtBN9e5zJe4eLV1dzXSE= github.com/onflow/flow-go-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo= github.com/onflow/flow-go-sdk v1.0.0-preview.42 h1:XcHWRQfkJ5A24sNqnmo3DocHdf5ulDJLie9/yh5c1Y4= github.com/onflow/flow-go-sdk v1.0.0-preview.42/go.mod h1:4/ELH5ooEdZ+9tZfoiTIkkB4B6wVgy4HbMjS/9w/67Q= From 1ae90f8f8e897e4dfba4a3004f832f12e076189d Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:20:59 +0200 Subject: [PATCH 51/55] update flow-emulator --- tests/go.mod | 2 +- tests/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/go.mod b/tests/go.mod index 531d7572..81154373 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -6,7 +6,7 @@ require ( github.com/goccy/go-json v0.10.2 github.com/onflow/cadence v1.0.0-preview.39 github.com/onflow/crypto v0.25.1 - github.com/onflow/flow-emulator v1.0.0-preview.36 + github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240725141711-547155b39eb9 github.com/onflow/flow-evm-gateway v0.0.0-20240201154855-4d4d3d3f19c7 github.com/onflow/flow-go v0.36.4 github.com/onflow/flow-go-sdk v1.0.0-preview.42 diff --git a/tests/go.sum b/tests/go.sum index d2b7dac3..d061465b 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -2084,6 +2084,8 @@ github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 h1:q9tXLIALwQ76bO4 github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 h1:FfhMBAb78p6VAWkJ+iqdKLErGQVQgxk5w6DP5ZruWX8= github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= +github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240725141711-547155b39eb9 h1:4jcGvTu5DkSSIgL1SM6L/dUA0qiewurIUXaN9vd3fHo= +github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240725141711-547155b39eb9/go.mod h1:+v5BCFmXbESbSlDb9dk6ER/mtUvVi/TMrPtmalyB1qs= github.com/onflow/flow-emulator v1.0.0-preview.36 h1:XCBWo6XNcnejxw17Qz8lmHW1fzwzApbrm4nxWp09yt4= github.com/onflow/flow-emulator v1.0.0-preview.36/go.mod h1:ngGgic4WYQzlW7esXgGQOpm1Berfar6q+z3qbDQ8ay8= github.com/onflow/flow-ft/lib/go/contracts v1.0.0 h1:mToacZ5NWqtlWwk/7RgIl/jeKB/Sy/tIXdw90yKHcV0= From 13fd0f20443b78e3f2b3d78fb55e217ad5275788 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:24:03 +0200 Subject: [PATCH 52/55] update emulator --- tests/go.mod | 6 ++---- tests/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/go.mod b/tests/go.mod index 81154373..634461ef 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -6,7 +6,7 @@ require ( github.com/goccy/go-json v0.10.2 github.com/onflow/cadence v1.0.0-preview.39 github.com/onflow/crypto v0.25.1 - github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240725141711-547155b39eb9 + github.com/onflow/flow-emulator v0.62.1 github.com/onflow/flow-evm-gateway v0.0.0-20240201154855-4d4d3d3f19c7 github.com/onflow/flow-go v0.36.4 github.com/onflow/flow-go-sdk v1.0.0-preview.42 @@ -132,7 +132,6 @@ require ( github.com/mattn/go-runewidth v0.0.15 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/minio/sha256-simd v1.0.1 // indirect - github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect @@ -153,6 +152,7 @@ require ( github.com/onflow/flow-nft/lib/go/contracts v1.2.1 // indirect github.com/onflow/flow-nft/lib/go/templates v1.2.0 // indirect github.com/onflow/flow/protobuf/go/flow v0.4.5 // indirect + github.com/onflow/nft-storefront/lib/go/contracts v1.0.0 // indirect github.com/onflow/sdks v0.6.0-preview.1 // indirect github.com/onflow/wal v1.0.2 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect @@ -172,7 +172,6 @@ require ( github.com/rs/cors v1.8.0 // indirect github.com/samber/lo v1.39.0 // indirect github.com/samber/slog-zerolog v1.0.0 // indirect - github.com/schollz/progressbar/v3 v3.13.1 // indirect github.com/sethvargo/go-limiter v1.0.0 // indirect github.com/sethvargo/go-retry v0.2.3 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect @@ -218,7 +217,6 @@ require ( golang.org/x/oauth2 v0.17.0 // indirect golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.20.0 // indirect - golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect diff --git a/tests/go.sum b/tests/go.sum index d061465b..bde04abe 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -2084,10 +2084,8 @@ github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 h1:q9tXLIALwQ76bO4 github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 h1:FfhMBAb78p6VAWkJ+iqdKLErGQVQgxk5w6DP5ZruWX8= github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= -github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240725141711-547155b39eb9 h1:4jcGvTu5DkSSIgL1SM6L/dUA0qiewurIUXaN9vd3fHo= -github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240725141711-547155b39eb9/go.mod h1:+v5BCFmXbESbSlDb9dk6ER/mtUvVi/TMrPtmalyB1qs= -github.com/onflow/flow-emulator v1.0.0-preview.36 h1:XCBWo6XNcnejxw17Qz8lmHW1fzwzApbrm4nxWp09yt4= -github.com/onflow/flow-emulator v1.0.0-preview.36/go.mod h1:ngGgic4WYQzlW7esXgGQOpm1Berfar6q+z3qbDQ8ay8= +github.com/onflow/flow-emulator v0.62.1 h1:VivECYftZbaIo9oZBVsmeE/LUcxdx7hJJ1ET2rGY8p8= +github.com/onflow/flow-emulator v0.62.1/go.mod h1:JbvxBZ39Q8hOQ5fSwuV0ZJwfaiQeaYTiIY04ws8LcNE= github.com/onflow/flow-ft/lib/go/contracts v1.0.0 h1:mToacZ5NWqtlWwk/7RgIl/jeKB/Sy/tIXdw90yKHcV0= github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= github.com/onflow/flow-ft/lib/go/templates v1.0.0 h1:6cMS/lUJJ17HjKBfMO/eh0GGvnpElPgBXx7h5aoWJhs= @@ -2106,6 +2104,8 @@ github.com/onflow/flow/protobuf/go/flow v0.4.5 h1:6o+pgYGqwXdEhqSJxu2BdnDXkOQVOk github.com/onflow/flow/protobuf/go/flow v0.4.5/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= github.com/onflow/go-ethereum v1.14.7 h1:gg3awYqI02e3AypRdpJKEvNTJ6kz/OhAqRti0h54Wlc= github.com/onflow/go-ethereum v1.14.7/go.mod h1:zV14QLrXyYu5ucvcwHUA0r6UaqveqbXaehAVQJlSW+I= +github.com/onflow/nft-storefront/lib/go/contracts v1.0.0 h1:sxyWLqGm/p4EKT6DUlQESDG1ZNMN9GjPCm1gTq7NGfc= +github.com/onflow/nft-storefront/lib/go/contracts v1.0.0/go.mod h1:kMeq9zUwCrgrSojEbTUTTJpZ4WwacVm2pA7LVFr+glk= github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU= github.com/onflow/sdks v0.6.0-preview.1 h1:mb/cUezuqWEP1gFZNAgUI4boBltudv4nlfxke1KBp9k= github.com/onflow/sdks v0.6.0-preview.1/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU= From cb6fa7bdca60481256980d5c0e408a9aab3c75ea Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:24:30 +0200 Subject: [PATCH 53/55] Revert "update emulator" This reverts commit 13fd0f20443b78e3f2b3d78fb55e217ad5275788. --- tests/go.mod | 6 ++++-- tests/go.sum | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/go.mod b/tests/go.mod index 634461ef..81154373 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -6,7 +6,7 @@ require ( github.com/goccy/go-json v0.10.2 github.com/onflow/cadence v1.0.0-preview.39 github.com/onflow/crypto v0.25.1 - github.com/onflow/flow-emulator v0.62.1 + github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240725141711-547155b39eb9 github.com/onflow/flow-evm-gateway v0.0.0-20240201154855-4d4d3d3f19c7 github.com/onflow/flow-go v0.36.4 github.com/onflow/flow-go-sdk v1.0.0-preview.42 @@ -132,6 +132,7 @@ require ( github.com/mattn/go-runewidth v0.0.15 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/minio/sha256-simd v1.0.1 // indirect + github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect @@ -152,7 +153,6 @@ require ( github.com/onflow/flow-nft/lib/go/contracts v1.2.1 // indirect github.com/onflow/flow-nft/lib/go/templates v1.2.0 // indirect github.com/onflow/flow/protobuf/go/flow v0.4.5 // indirect - github.com/onflow/nft-storefront/lib/go/contracts v1.0.0 // indirect github.com/onflow/sdks v0.6.0-preview.1 // indirect github.com/onflow/wal v1.0.2 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect @@ -172,6 +172,7 @@ require ( github.com/rs/cors v1.8.0 // indirect github.com/samber/lo v1.39.0 // indirect github.com/samber/slog-zerolog v1.0.0 // indirect + github.com/schollz/progressbar/v3 v3.13.1 // indirect github.com/sethvargo/go-limiter v1.0.0 // indirect github.com/sethvargo/go-retry v0.2.3 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect @@ -217,6 +218,7 @@ require ( golang.org/x/oauth2 v0.17.0 // indirect golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect diff --git a/tests/go.sum b/tests/go.sum index bde04abe..d061465b 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -2084,8 +2084,10 @@ github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 h1:q9tXLIALwQ76bO4 github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 h1:FfhMBAb78p6VAWkJ+iqdKLErGQVQgxk5w6DP5ZruWX8= github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= -github.com/onflow/flow-emulator v0.62.1 h1:VivECYftZbaIo9oZBVsmeE/LUcxdx7hJJ1ET2rGY8p8= -github.com/onflow/flow-emulator v0.62.1/go.mod h1:JbvxBZ39Q8hOQ5fSwuV0ZJwfaiQeaYTiIY04ws8LcNE= +github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240725141711-547155b39eb9 h1:4jcGvTu5DkSSIgL1SM6L/dUA0qiewurIUXaN9vd3fHo= +github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240725141711-547155b39eb9/go.mod h1:+v5BCFmXbESbSlDb9dk6ER/mtUvVi/TMrPtmalyB1qs= +github.com/onflow/flow-emulator v1.0.0-preview.36 h1:XCBWo6XNcnejxw17Qz8lmHW1fzwzApbrm4nxWp09yt4= +github.com/onflow/flow-emulator v1.0.0-preview.36/go.mod h1:ngGgic4WYQzlW7esXgGQOpm1Berfar6q+z3qbDQ8ay8= github.com/onflow/flow-ft/lib/go/contracts v1.0.0 h1:mToacZ5NWqtlWwk/7RgIl/jeKB/Sy/tIXdw90yKHcV0= github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= github.com/onflow/flow-ft/lib/go/templates v1.0.0 h1:6cMS/lUJJ17HjKBfMO/eh0GGvnpElPgBXx7h5aoWJhs= @@ -2104,8 +2106,6 @@ github.com/onflow/flow/protobuf/go/flow v0.4.5 h1:6o+pgYGqwXdEhqSJxu2BdnDXkOQVOk github.com/onflow/flow/protobuf/go/flow v0.4.5/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= github.com/onflow/go-ethereum v1.14.7 h1:gg3awYqI02e3AypRdpJKEvNTJ6kz/OhAqRti0h54Wlc= github.com/onflow/go-ethereum v1.14.7/go.mod h1:zV14QLrXyYu5ucvcwHUA0r6UaqveqbXaehAVQJlSW+I= -github.com/onflow/nft-storefront/lib/go/contracts v1.0.0 h1:sxyWLqGm/p4EKT6DUlQESDG1ZNMN9GjPCm1gTq7NGfc= -github.com/onflow/nft-storefront/lib/go/contracts v1.0.0/go.mod h1:kMeq9zUwCrgrSojEbTUTTJpZ4WwacVm2pA7LVFr+glk= github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU= github.com/onflow/sdks v0.6.0-preview.1 h1:mb/cUezuqWEP1gFZNAgUI4boBltudv4nlfxke1KBp9k= github.com/onflow/sdks v0.6.0-preview.1/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU= From c85a817b144d9ad7420077012ad94674c49ca764 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:24:50 +0200 Subject: [PATCH 54/55] tidy --- tests/go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/go.sum b/tests/go.sum index d061465b..9ee2ea1b 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -2086,8 +2086,6 @@ github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 h1:FfhMBAb78p6VAWk github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240725141711-547155b39eb9 h1:4jcGvTu5DkSSIgL1SM6L/dUA0qiewurIUXaN9vd3fHo= github.com/onflow/flow-emulator v1.0.0-preview.35.0.20240725141711-547155b39eb9/go.mod h1:+v5BCFmXbESbSlDb9dk6ER/mtUvVi/TMrPtmalyB1qs= -github.com/onflow/flow-emulator v1.0.0-preview.36 h1:XCBWo6XNcnejxw17Qz8lmHW1fzwzApbrm4nxWp09yt4= -github.com/onflow/flow-emulator v1.0.0-preview.36/go.mod h1:ngGgic4WYQzlW7esXgGQOpm1Berfar6q+z3qbDQ8ay8= github.com/onflow/flow-ft/lib/go/contracts v1.0.0 h1:mToacZ5NWqtlWwk/7RgIl/jeKB/Sy/tIXdw90yKHcV0= github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= github.com/onflow/flow-ft/lib/go/templates v1.0.0 h1:6cMS/lUJJ17HjKBfMO/eh0GGvnpElPgBXx7h5aoWJhs= From a292bde7643883c6d13423e9f921c05e866e03e1 Mon Sep 17 00:00:00 2001 From: sideninja <75445744+sideninja@users.noreply.github.com> Date: Thu, 25 Jul 2024 18:13:56 +0200 Subject: [PATCH 55/55] backward compatibility blocks --- api/api.go | 1 + models/block.go | 69 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/api/api.go b/api/api.go index a8dde16f..507f6da1 100644 --- a/api/api.go +++ b/api/api.go @@ -883,6 +883,7 @@ func (b *BlockChainAPI) prepareBlockResponse( fullTx bool, ) (*Block, error) { h, err := block.Hash() + fmt.Println("### HASH", h) if err != nil { b.logger.Error().Err(err).Msg("failed to calculate hash for block by number") return nil, errs.ErrInternal diff --git a/models/block.go b/models/block.go index c8f2eb0e..497d6724 100644 --- a/models/block.go +++ b/models/block.go @@ -8,6 +8,7 @@ import ( "github.com/onflow/flow-go/fvm/evm/events" "github.com/onflow/flow-go/fvm/evm/types" gethCommon "github.com/onflow/go-ethereum/common" + gethCrypto "github.com/onflow/go-ethereum/crypto" "github.com/onflow/go-ethereum/rlp" ) @@ -23,14 +24,50 @@ var GenesisBlock = &Block{Block: types.GenesisBlock} func NewBlockFromBytes(data []byte) (*Block, error) { var b *Block - return b, rlp.DecodeBytes(data, &b) + err := rlp.DecodeBytes(data, &b) + if err != nil { + // todo temp remove this after previewnet is deprecated + var bV0360 *blockV0360 + if err := rlp.DecodeBytes(data, &bV0360); err != nil { + return nil, fmt.Errorf("failed to decode block [%x]: %w", data, err) + } + b = &Block{ + Block: &types.Block{ + ParentBlockHash: bV0360.ParentBlockHash, + Height: bV0360.Height, + Timestamp: bV0360.Timestamp, + TotalSupply: bV0360.TotalSupply, + ReceiptRoot: bV0360.ReceiptRoot, + TransactionHashRoot: gethCommon.Hash{}, + TotalGasUsed: bV0360.TotalGasUsed, + }, + TransactionHashes: bV0360.TransactionHashes, + } + h, err := bV0360.Hash() + if err != nil { + return nil, fmt.Errorf("failed to calculate backward compatible hash for block: %w", err) + } + b.hash = &h + } + + return b, nil } type Block struct { *types.Block + hash *gethCommon.Hash TransactionHashes []gethCommon.Hash } +// todo temp remove after previewnet is deprecated +// this will return an existing precalculated hash if it exsists +func (b *Block) Hash() (gethCommon.Hash, error) { + if b.hash != nil { + return *b.hash, nil + } + return b.Block.Hash() +} + func (b *Block) ToBytes() ([]byte, error) { return rlp.EncodeToBytes(b) } @@ -55,3 +92,33 @@ func decodeBlockEvent(event cadence.Event) (*Block, error) { }, }, nil } + +// TODO temp remove after previewnet is deprecated +// this is an older format for the block, that contains transaction hashes +type blockV0360 struct { + // the hash of the parent block + ParentBlockHash gethCommon.Hash + // Height returns the height of this block + Height uint64 + // Timestamp is a Unix timestamp in seconds at which the block was created + // Note that this value must be provided from the FVM Block + Timestamp uint64 + // holds the total amount of the native token deposited in the evm side. (in attoflow) + TotalSupply *big.Int + // ReceiptRoot returns the root hash of the receipts emitted in this block + // Note that this value won't be unique to each block, for example for the + // case of empty trie of receipts or a single receipt with no logs and failed state + // the same receipt root would be reported for block. + ReceiptRoot gethCommon.Hash + + // transaction hashes + TransactionHashes []gethCommon.Hash + + // stores gas used by all transactions included in the block. + TotalGasUsed uint64 +} + +func (b *blockV0360) Hash() (gethCommon.Hash, error) { + data, err := rlp.EncodeToBytes(b) + return gethCrypto.Keccak256Hash(data), err +}