From 6a76a5c50e8c5f2adb85079099cb857632dc289d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 29 Dec 2023 23:42:52 -0600 Subject: [PATCH] chore: catch up main to v21.1.x (backport #7215) (#7216) * chore: catch up main to v21.1.x (#7215) * Reduce discrepancy in fee simulation * Update * State compatible applyFuncIfNoError event reduction * Update osmoutils/epochs versions * Update SDK version * One more epoch speedup * Speedup core loop of epoch * fix test (#7197) * refactor: auto-set timeout-commit to 4s for faster block times (#7196) * updates (#7192) * refactor: auto-set timeout-commit to 4s for faster block times (backport #7180) * changelog * Revert "updates (#7192)" This reverts commit 6cc26f91b9fcc2f890aaad6fb07b13f31e45c7f9. * lint * Update changelog * Update changelog * changelog * Speedup multiplication * Try scratch slice * refactor: arb filter for new authz exec swap (#7210) * refactor: arb filter for new authz exec swap * updates * updates * updates * clean up * Auto: update go.mod after push to adam/v21.1.x-merge-to-main that modified dependencies locally * add 21.1.5 to changelog * update comment --------- Co-authored-by: Dev Ojha Co-authored-by: Roman Co-authored-by: github-actions (cherry picked from commit c5a51475b27888e203f60cae369533c480cba7ac) # Conflicts: # go.mod # go.sum # osmomath/go.sum * go mod update * update go mods from v21.x --------- Co-authored-by: Adam Tucker Co-authored-by: Adam Tucker --- CHANGELOG.md | 33 +++++- go.mod | 14 +-- go.sum | 50 ++------- osmomath/go.mod | 8 +- osmomath/go.sum | 8 +- osmoutils/cache_ctx.go | 27 +++++ osmoutils/go.mod | 6 +- tests/cl-genesis-positions/go.mod | 6 +- tests/cl-go-client/go.mod | 6 +- x/epochs/go.mod | 6 +- x/epochs/types/hooks.go | 2 +- x/epochs/types/hooks_test.go | 4 +- x/ibc-hooks/go.mod | 6 +- x/incentives/keeper/distribute.go | 28 +++-- x/incentives/keeper/iterator.go | 5 +- x/incentives/keeper/iterator_test.go | 3 +- x/superfluid/keeper/epoch.go | 6 +- x/txfees/keeper/feedecorator.go | 20 +++- x/txfees/keeper/feedecorator_test.go | 3 + x/txfees/keeper/txfee_filters/arb_tx.go | 108 +++++++++++++++++-- x/txfees/keeper/txfee_filters/arb_tx_test.go | 30 ++++++ 21 files changed, 274 insertions(+), 105 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0400799912..b6bbe20ba72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,22 +42,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -### Config - -* [#7180](https://github.com/osmosis-labs/osmosis/pull/7180) Change `consensus.timeout-commit` from 5s to 4s in `config.toml`. Overwrites the existing value on start-up. Default is set to 4s. - ### API * [#6991](https://github.com/osmosis-labs/osmosis/pull/6991) Fix: total liquidity poolmanager grpc gateway query * [#7149](https://github.com/osmosis-labs/osmosis/pull/7149) Fix double emitting CacheCtx events (e.g. Epoch, Superfluid, CL) ### Features -* [#6804](https://github.com/osmosis-labs/osmosis/pull/6993) feat(math): add mutative api for BigDec.BigInt() + +* [#6993](https://github.com/osmosis-labs/osmosis/pull/6993) feat(math): add mutative api for BigDec.BigInt() ### Misc Improvements + * [#7106](https://github.com/osmosis-labs/osmosis/pull/7106) Halve the time of log2 calculation (speeds up TWAP code) * [#7093](https://github.com/osmosis-labs/osmosis/pull/7093),[#7100](https://github.com/osmosis-labs/osmosis/pull/7100),[#7172](https://github.com/osmosis-labs/osmosis/pull/7093) Lower CPU overheads of the Osmosis epoch. +## v21.1.5 + +* [#7210](https://github.com/osmosis-labs/osmosis/pull/7210) Arb filter for new authz exec swap. + +## v21.1.4 + +* [#7180](https://github.com/osmosis-labs/osmosis/pull/7180) Change `consensus.timeout-commit` from 5s to 4s in `config.toml`. Overwrites the existing value on start-up. Default is set to 4s. + +## v21.1.3 + +Epoch and CPU time optimizations + +* [#7093](https://github.com/osmosis-labs/osmosis/pull/7093),[#7100](https://github.com/osmosis-labs/osmosis/pull/7100),[#7172](https://github.com/osmosis-labs/osmosis/pull/7172),[#7174](https://github.com/osmosis-labs/osmosis/pull/7174),[#7186](https://github.com/osmosis-labs/osmosis/pull/7186), [#7192](https://github.com/osmosis-labs/osmosis/pull/7192) Lower CPU overheads of the Osmosis epoch. +* [#7106](https://github.com/osmosis-labs/osmosis/pull/7106) Halve the time of log2 calculation (speeds up TWAP code) + +## v21.1.2 + +* [#7170](https://github.com/osmosis-labs/osmosis/pull/7170) Update mempool-eip1559 params to cause less base fee spikes on mainnet. +* [#7093](https://github.com/osmosis-labs/osmosis/pull/7093),[#7100](https://github.com/osmosis-labs/osmosis/pull/7100),[#7172](https://github.com/osmosis-labs/osmosis/pull/7172),[#7174](https://github.com/osmosis-labs/osmosis/pull/7174),[#7186](https://github.com/osmosis-labs/osmosis/pull/7186), [#7192](https://github.com/osmosis-labs/osmosis/pull/7186) Lower CPU overheads of the Osmosis epoch. +* [#7106](https://github.com/osmosis-labs/osmosis/pull/7106) Halve the time of log2 calculation (speeds up TWAP code) + +## v21.1.1 + +Epoch optimizations are in this release, see a subset of PR links in v21.1.3 section. + ## v21.0.0 ### API diff --git a/go.mod b/go.mod index afda806e402..be19cd673e2 100644 --- a/go.mod +++ b/go.mod @@ -29,10 +29,10 @@ require ( github.com/mattn/go-sqlite3 v1.14.17 github.com/ory/dockertest/v3 v3.10.0 github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3 - github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20231215224605-7c13c8d20c96 - github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20231207233718-ef61c5f32b31 - github.com/osmosis-labs/osmosis/x/epochs v0.0.3-0.20231207233718-ef61c5f32b31 - github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.9-0.20231207233718-ef61c5f32b31 + github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20231230033922-af0ba43e918a + github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20231230033922-af0ba43e918a + github.com/osmosis-labs/osmosis/x/epochs v0.0.3-0.20231230033922-af0ba43e918a + github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.9-0.20231230033922-af0ba43e918a github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 github.com/redis/go-redis/v9 v9.3.0 @@ -382,9 +382,9 @@ replace ( // v1.0.0-beta.3 is incompatible, so we use v1.0.0-beta.2 github.com/cosmos/cosmos-proto => github.com/cosmos/cosmos-proto v1.0.0-beta.2 - // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo/v0.47.5, current branch: osmo/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/15259ccd2249d2f3f413e0de7b8e27fe4cc6169a - // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-osmo - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo + // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo/v0.47.5, current branch: osmo/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cc29414c72c73d567e0c75b4a0800961a26d7af4 + // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-osmo-4 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo-4 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/go.sum b/go.sum index 18cdac029d6..55282963b2b 100644 --- a/go.sum +++ b/go.sum @@ -558,7 +558,6 @@ github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8 github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CosmWasm/wasmvm v1.5.0 h1:3hKeT9SfwfLhxTGKH3vXaKFzBz1yuvP8SlfwfQXbQfw= github.com/CosmWasm/wasmvm v1.5.0/go.mod h1:fXB+m2gyh4v9839zlIXdMZGeLAxqUdYdFQqYsTha2hc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= @@ -699,7 +698,6 @@ github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iy github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 h1:W9o46d2kbNL06lq7UNDPV0zYLzkrde/bjIqO02eoll0= github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8/go.mod h1:gakxgyXaaPkxvLw1XQxNGK4I37ys9iBRzNUx/B7pUCo= -github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo= @@ -712,7 +710,6 @@ github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObk github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= -github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= @@ -733,7 +730,6 @@ github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWH github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= @@ -741,7 +737,6 @@ github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9D 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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= @@ -750,13 +745,11 @@ github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AK github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/confio/ics23/go v0.9.1 h1:3MV46eeWwO3xCauKyAtuAdJYMyPnnchW4iLr2bTw6/U= github.com/confio/ics23/go v0.9.1/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= @@ -795,7 +788,6 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= -github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/daixiang0/gci v0.11.0 h1:XeQbFKkCRxvVyn06EOuNY6LPGBLVuB/W130c8FrnX6A= github.com/daixiang0/gci v0.11.0/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= @@ -847,7 +839,6 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -871,7 +862,6 @@ github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= @@ -924,7 +914,6 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= @@ -973,14 +962,12 @@ github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= @@ -1190,7 +1177,6 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -1404,7 +1390,6 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1417,7 +1402,6 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moricho/tparallel v0.3.1 h1:fQKD4U1wRMAYNngDonW5XupoB/ZGJHdpzrWqgyg9krA= github.com/moricho/tparallel v0.3.1/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= -github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -1466,8 +1450,6 @@ github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7X github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.7 h1:y2EZDS8sNng4Ksf0GUYNhKbTShZJPJg1FiXJNH/uoCk= github.com/opencontainers/runc v1.1.7/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -1479,20 +1461,18 @@ github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= -github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo h1:Nud33/nOZvkVguLS3IwKR0vgz/0jEOixHxHnXF7eDvE= -github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo/go.mod h1:EHwCeN9IXonsjKcjpS12MqeStdZvIdxt3VYXhus3G3c= +github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo-4 h1:RCd53Gnnn9yrjjdh8sBkhitqTz/dHEvwkEqs12Y0ELU= +github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo-4/go.mod h1:EHwCeN9IXonsjKcjpS12MqeStdZvIdxt3VYXhus3G3c= github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3 h1:YlmchqTmlwdWSmrRmXKR+PcU96ntOd8u10vTaTZdcNY= github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3/go.mod h1:lV6KnqXYD/ayTe7310MHtM3I2q8Z6bBfMAi+bhwPYtI= -github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20231211173227-afdfd0b87e09 h1:AXaAPdFmhl9+3Y57e8GwDMaOKkNIQyCZ8Y80rtwPUl8= -github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20231211173227-afdfd0b87e09/go.mod h1:TgRPf8FTJn2ceab7j3NovGC7DQBGDBrXR+icGUJUdbM= -github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20231215224605-7c13c8d20c96 h1:VsXG3TeeOeuDjrpe9iL9T7biMdMSP1ur3mmKweAQ5i8= -github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20231215224605-7c13c8d20c96/go.mod h1:TgRPf8FTJn2ceab7j3NovGC7DQBGDBrXR+icGUJUdbM= -github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20231207233718-ef61c5f32b31 h1:7kGOQdocFexW8LoBavYJ/fTAydZENc+7/AU4HcHTpqQ= -github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20231207233718-ef61c5f32b31/go.mod h1:H82/DKmIxsBu/0pawNuFElRtHegc/9VMiwPknDjN+S0= -github.com/osmosis-labs/osmosis/x/epochs v0.0.3-0.20231207233718-ef61c5f32b31 h1:bBnd9GNniYODaBx+4HTLTmOjy92J+ydqcAVu3PF9hsc= -github.com/osmosis-labs/osmosis/x/epochs v0.0.3-0.20231207233718-ef61c5f32b31/go.mod h1:BE01RbTCHHJnc6wZAgM9/y0w8Eqvt2r8XHUeL3SfYNM= -github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.9-0.20231207233718-ef61c5f32b31 h1:O8DadD418HbDouCd6CC1YLCghxjaOoIqv+zQloKwJNw= -github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.9-0.20231207233718-ef61c5f32b31/go.mod h1:8G4rVmMW69/kLf+Ol5U7rzZEWcX98NzHoh2bFTHnIZw= +github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20231230033922-af0ba43e918a h1:kUYapBvN7T5bP8JJdfvEm43Sx0uswMQC7sMOSpLPBgI= +github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20231230033922-af0ba43e918a/go.mod h1:KI8rTPBt2+0uSbmqG4jAu2UcLTlbQbHMN5L5zKwaYZE= +github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20231230033922-af0ba43e918a h1:BXsH0SEatBFZW8Sn76yHVbFHxubrPCDJl5iJq20/Bok= +github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20231230033922-af0ba43e918a/go.mod h1:1jwSXz17AKWG4enDVh3jiQR7aao4+vJcYvUsKUbrOKk= +github.com/osmosis-labs/osmosis/x/epochs v0.0.3-0.20231230033922-af0ba43e918a h1:8E5kfBUgznIr2GGMacb8EmT8EEUpijYmber3NSNwQUE= +github.com/osmosis-labs/osmosis/x/epochs v0.0.3-0.20231230033922-af0ba43e918a/go.mod h1:tQTs2/BbDThu5lm7wWo10LcLORpesqUs6lAc4JrPJ2E= +github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.9-0.20231230033922-af0ba43e918a h1:0uGi0vDzqZlBQlvdcMp6bjy+uCJiJxTFKD3yTIBFoC8= +github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.9-0.20231230033922-af0ba43e918a/go.mod h1:2fsIpbwZ0taYz4tCZllxIOdTWhFVJrV0778SSmukSWE= github.com/osmosis-labs/wasmd v0.45.0-osmo h1:NIp7pvJV5HuBN1HwPgEmXKQM2TjVIVdJErIHnB9IMO8= github.com/osmosis-labs/wasmd v0.45.0-osmo/go.mod h1:J6eRvwii5T1WxhetZkBg1kOJS3GTn1Bw2OLyZBb8EVU= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= @@ -1514,7 +1494,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= @@ -1522,7 +1501,6 @@ github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0 github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1578,7 +1556,6 @@ github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwa github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/quasilyte/go-ruleguard v0.4.0 h1:DyM6r+TKL+xbKB4Nm7Afd1IQh9kEUKQs2pboWGKtvQo= github.com/quasilyte/go-ruleguard v0.4.0/go.mod h1:Eu76Z/R8IXtViWUIHkE3p8gdH3/PKk1eh3YGfaEof10= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= @@ -1634,9 +1611,7 @@ github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tM github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= github.com/sashamelentyev/usestdlibvars v1.24.0 h1:MKNzmXtGh5N0y74Z/CIaJh4GlB364l0K1RUT08WSWAc= github.com/sashamelentyev/usestdlibvars v1.24.0/go.mod h1:9cYkq+gYJ+a5W2RPdhfaSCnTVUC1OQP/bSiiBhq3OZE= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/securego/gosec/v2 v2.17.0 h1:ZpAStTDKY39insEG9OH6kV3IkhQZPTq9a9eGOLOjcdI= github.com/securego/gosec/v2 v2.17.0/go.mod h1:lt+mgC91VSmriVoJLentrMkRCYs+HLTBnUFUBuhV2hc= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= @@ -1683,7 +1658,6 @@ github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tL github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -1717,7 +1691,6 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8= @@ -1765,7 +1738,6 @@ github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqz github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/uudashr/gocognit v1.0.7 h1:e9aFXgKgUJrQ5+bs61zBigmj7bFJ/5cC6HmMahVzuDo= github.com/uudashr/gocognit v1.0.7/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= @@ -1773,8 +1745,6 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= diff --git a/osmomath/go.mod b/osmomath/go.mod index 3a1803bbf0e..de021008d81 100644 --- a/osmomath/go.mod +++ b/osmomath/go.mod @@ -21,7 +21,7 @@ require ( github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/confio/ics23/go v0.9.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect github.com/cosmos/gogoproto v1.4.10 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect @@ -90,9 +90,9 @@ replace ( // v1.0.0-beta.3 is incompatible, so we use v1.0.0-beta.2 github.com/cosmos/cosmos-proto => github.com/cosmos/cosmos-proto v1.0.0-beta.2 - // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo/v0.47.5, current branch: osmo/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/15259ccd2249d2f3f413e0de7b8e27fe4cc6169a - // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-osmo - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo + // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo/v0.47.5, current branch: osmo/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cc29414c72c73d567e0c75b4a0800961a26d7af4 + // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-osmo-4 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo-4 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 // newer versions of exp treat sorting differently, which is incompatible with the current version of cosmos-sdk diff --git a/osmomath/go.sum b/osmomath/go.sum index 79e46c2d162..44918c7669f 100644 --- a/osmomath/go.sum +++ b/osmomath/go.sum @@ -40,8 +40,8 @@ cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= -cosmossdk.io/math v1.1.2 h1:ORZetZCTyWkI5GlZ6CZS28fMHi83ZYf+A2vVnHNzZBM= -cosmossdk.io/math v1.1.2/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= +cosmossdk.io/math v1.1.3-rc.1 h1:NebCNWDqb1MJRNfvxr4YY7d8FSYgkuB3L75K6xvM+Zo= +cosmossdk.io/math v1.1.3-rc.1/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= @@ -286,8 +286,8 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20231030033644-c3c7ab7f52ea h1:bjsWFvtls8uujfqhCRr1dS/0HRalHVNXF0PV9aoYz9I= -github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20231030033644-c3c7ab7f52ea/go.mod h1:EHwCeN9IXonsjKcjpS12MqeStdZvIdxt3VYXhus3G3c= +github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo-4 h1:RCd53Gnnn9yrjjdh8sBkhitqTz/dHEvwkEqs12Y0ELU= +github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo-4/go.mod h1:EHwCeN9IXonsjKcjpS12MqeStdZvIdxt3VYXhus3G3c= github.com/osmosis-labs/osmosis/osmoutils v0.0.0-20230911115719-1d5a34978fe1 h1:mQlIqW3xBc7XOyDUqrqsPf47hQBrja9iKi4aRBUq3ws= github.com/osmosis-labs/osmosis/osmoutils v0.0.0-20230911115719-1d5a34978fe1/go.mod h1:7VoXHwrSSx8Sii0UFc9YIixF6C/9XfV1pdU2Dliu4WA= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= diff --git a/osmoutils/cache_ctx.go b/osmoutils/cache_ctx.go index a7bd0bf4bf2..c7bc5f287b7 100644 --- a/osmoutils/cache_ctx.go +++ b/osmoutils/cache_ctx.go @@ -42,6 +42,33 @@ func ApplyFuncIfNoError(ctx sdk.Context, f func(ctx sdk.Context) error) (err err return err } +// This function only exists because somehow events are edge-case gas metered. +// TODO: This should become ApplyFuncIfNoError next upgrade. +func UnmeteredApplyFuncIfNoError(ctx sdk.Context, f func(ctx sdk.Context) error) (err error) { + // Add a panic safeguard + defer func() { + if recoveryError := recover(); recoveryError != nil { + if isErr, _ := IsOutOfGasError(recoveryError); isErr { + // We panic with the same error, to replicate the normal tx execution flow. + panic(recoveryError) + } else { + PrintPanicRecoveryError(ctx, recoveryError) + err = errors.New("panic occurred during execution") + } + } + }() + // makes a new cache context, which all state changes get wrapped inside of. + cacheCtx, write := ctx.CacheContext() + err = f(cacheCtx) + if err != nil { + ctx.Logger().Error(err.Error()) + } else { + // no error, write the output of f + write() + } + return err +} + // Frustratingly, this has to return the error descriptor, not an actual error itself // because the SDK errors here are not actually errors. (They don't implement error interface) func IsOutOfGasError(err any) (bool, string) { diff --git a/osmoutils/go.mod b/osmoutils/go.mod index c56d4b8daf1..7425a356de9 100644 --- a/osmoutils/go.mod +++ b/osmoutils/go.mod @@ -158,9 +158,9 @@ require ( ) replace ( - // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo/v0.47.5, current branch: osmo/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/15259ccd2249d2f3f413e0de7b8e27fe4cc6169a - // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-osmo - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo + // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo/v0.47.5, current branch: osmo/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cc29414c72c73d567e0c75b4a0800961a26d7af4 + // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-osmo-4 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo-4 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 // newer versions of exp treat sorting differently, which is incompatible with the current version of cosmos-sdk diff --git a/tests/cl-genesis-positions/go.mod b/tests/cl-genesis-positions/go.mod index cbd8b383bd8..039daa13ee3 100644 --- a/tests/cl-genesis-positions/go.mod +++ b/tests/cl-genesis-positions/go.mod @@ -197,9 +197,9 @@ replace ( // v1.0.0-beta.3 is incompatible, so we use v1.0.0-beta.2 github.com/cosmos/cosmos-proto => github.com/cosmos/cosmos-proto v1.0.0-beta.2 - // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo/v0.47.5, current branch: osmo/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/15259ccd2249d2f3f413e0de7b8e27fe4cc6169a - // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-osmo - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo + // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo/v0.47.5, current branch: osmo/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cc29414c72c73d567e0c75b4a0800961a26d7af4 + // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-osmo-4 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo-4 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/tests/cl-go-client/go.mod b/tests/cl-go-client/go.mod index fb6b524303a..0b59469b3c4 100644 --- a/tests/cl-go-client/go.mod +++ b/tests/cl-go-client/go.mod @@ -172,9 +172,9 @@ replace ( // v1.0.0-beta.3 is incompatible, so we use v1.0.0-beta.2 github.com/cosmos/cosmos-proto => github.com/cosmos/cosmos-proto v1.0.0-beta.2 - // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo/v0.47.5, current branch: osmo/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/15259ccd2249d2f3f413e0de7b8e27fe4cc6169a - // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-osmo - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo + // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo/v0.47.5, current branch: osmo/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cc29414c72c73d567e0c75b4a0800961a26d7af4 + // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-osmo-4 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo-4 github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/x/epochs/go.mod b/x/epochs/go.mod index 44b2fd10084..b6df7c202d1 100644 --- a/x/epochs/go.mod +++ b/x/epochs/go.mod @@ -190,9 +190,9 @@ require ( ) replace ( - // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo/v0.47.5, current branch: osmo/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/15259ccd2249d2f3f413e0de7b8e27fe4cc6169a - // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-osmo - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo + // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo/v0.47.5, current branch: osmo/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cc29414c72c73d567e0c75b4a0800961a26d7af4 + // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-osmo-4 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo-4 // newer versions of exp treat sorting differently, which is incompatible with the current version of cosmos-sdk golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb diff --git a/x/epochs/types/hooks.go b/x/epochs/types/hooks.go index ad9e456a25b..2212a66b036 100644 --- a/x/epochs/types/hooks.go +++ b/x/epochs/types/hooks.go @@ -50,7 +50,7 @@ func panicCatchingEpochHook( return hookFn(ctx, epochIdentifier, epochNumber) } // TODO: Thread info for which hook this is, may be dependent on larger hook system refactoring - err := osmoutils.ApplyFuncIfNoError(ctx, wrappedHookFn) + err := osmoutils.UnmeteredApplyFuncIfNoError(ctx, wrappedHookFn) if err != nil { ctx.Logger().Error(fmt.Sprintf("error in epoch hook %v", err)) } diff --git a/x/epochs/types/hooks_test.go b/x/epochs/types/hooks_test.go index 6ccdb07252c..8f8d9e1d8fb 100644 --- a/x/epochs/types/hooks_test.go +++ b/x/epochs/types/hooks_test.go @@ -95,10 +95,10 @@ func (s *KeeperTestSuite) TestHooksPanicRecovery() { expectedCounterValues []int lenEvents int }{ - {[]dummyEpochHook{noPanicHook}, []int{1}, 2}, + {[]dummyEpochHook{noPanicHook}, []int{1}, 1}, {[]dummyEpochHook{panicHook}, []int{0}, 0}, {[]dummyEpochHook{errorHook}, []int{0}, 0}, - {simpleHooks, []int{0, 1, 0, 1}, 4}, + {simpleHooks, []int{0, 1, 0, 1}, 2}, } for tcIndex, tc := range tests { diff --git a/x/ibc-hooks/go.mod b/x/ibc-hooks/go.mod index c99ca05f49e..b1cbf9775ca 100644 --- a/x/ibc-hooks/go.mod +++ b/x/ibc-hooks/go.mod @@ -191,9 +191,9 @@ require ( ) replace ( - // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo/v0.47.5, current branch: osmo/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/15259ccd2249d2f3f413e0de7b8e27fe4cc6169a - // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-osmo - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo + // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk/tree/osmo/v0.47.5, current branch: osmo/v0.47.5. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/cc29414c72c73d567e0c75b4a0800961a26d7af4 + // https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.47.5-osmo-4 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo-4 // newer versions of exp treat sorting differently, which is incompatible with the current version of cosmos-sdk golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb diff --git a/x/incentives/keeper/distribute.go b/x/incentives/keeper/distribute.go index 68a6b4a8f9b..f43801f8b2b 100644 --- a/x/incentives/keeper/distribute.go +++ b/x/incentives/keeper/distribute.go @@ -3,6 +3,7 @@ package keeper import ( "errors" "fmt" + "math/big" "time" db "github.com/cometbft/cometbft-db" @@ -14,6 +15,8 @@ import ( "github.com/osmosis-labs/osmosis/v21/x/incentives/types" lockuptypes "github.com/osmosis-labs/osmosis/v21/x/lockup/types" poolmanagertypes "github.com/osmosis-labs/osmosis/v21/x/poolmanager/types" + + sdkmath "cosmossdk.io/math" ) var ( @@ -670,13 +673,15 @@ func (k Keeper) distributeInternal( // too expensive + verbose even in debug mode. // ctx.Logger().Debug("distributeInternal, distribute to lock", "module", types.ModuleName, "gaugeId", gauge.Id, "lockId", lock.ID, "remainCons", remainCoins, "height", ctx.BlockHeight()) - denomLockAmt := guaranteedNonzeroCoinAmountOf(lock.Coins, denom) + denomLockAmt := guaranteedNonzeroCoinAmountOf(lock.Coins, denom).BigIntMut() for _, coin := range remainCoins { - // distribution amount = gauge_size * denom_lock_amount / (total_denom_lock_amount * remain_epochs) - amtInt := coin.Amount.Mul(denomLockAmt) + amtInt := sdkmath.NewIntFromBigInt(denomLockAmt) amtIntBi := amtInt.BigIntMut() + // distribution amount = gauge_size * denom_lock_amount / (total_denom_lock_amount * remain_epochs) + amtIntBi = amtIntBi.Mul(amtIntBi, coin.Amount.BigIntMut()) + checkBigInt(amtIntBi) amtIntBi.Quo(amtIntBi, lockSumTimesRemainingEpochsBi) - if amtInt.IsPositive() { + if amtInt.Sign() == 1 { newlyDistributedCoin := sdk.Coin{Denom: coin.Denom, Amount: amtInt} distrCoins = distrCoins.Add(newlyDistributedCoin) } @@ -708,8 +713,14 @@ func (k Keeper) distributeInternal( return totalDistrCoins, err } +func checkBigInt(bi *big.Int) { + if bi.BitLen() > sdkmath.MaxBitLen { + panic("overflow") + } +} + // faster coins.AmountOf if we know that coins must contain the denom. -// returns a new sdk int that can be mutated. +// returns a new big int that can be mutated. func guaranteedNonzeroCoinAmountOf(coins sdk.Coins, denom string) osmomath.Int { if coins.Len() == 1 { return coins[0].Amount @@ -762,7 +773,7 @@ func (k Keeper) handleGroupPostDistribute(ctx sdk.Context, groupGauge types.Gaug } // getDistributeToBaseLocks takes a gauge along with cached period locks by denom and returns locks that must be distributed to -func (k Keeper) getDistributeToBaseLocks(ctx sdk.Context, gauge types.Gauge, cache map[string][]lockuptypes.PeriodLock) []*lockuptypes.PeriodLock { +func (k Keeper) getDistributeToBaseLocks(ctx sdk.Context, gauge types.Gauge, cache map[string][]lockuptypes.PeriodLock, scratchSlice *[]*lockuptypes.PeriodLock) []*lockuptypes.PeriodLock { // if gauge is empty, don't get the locks if gauge.Coins.Empty() { return []*lockuptypes.PeriodLock{} @@ -777,7 +788,7 @@ func (k Keeper) getDistributeToBaseLocks(ctx sdk.Context, gauge types.Gauge, cac // get this from memory instead of hitting iterators / underlying stores. // due to many details of cacheKVStore, iteration will still cause expensive IAVL reads. allLocks := cache[distributeBaseDenom] - return FilterLocksByMinDuration(allLocks, gauge.DistributeTo.Duration) + return FilterLocksByMinDuration(allLocks, gauge.DistributeTo.Duration, scratchSlice) } // Distribute distributes coins from an array of gauges to all eligible locks and pools in the case of "NoLock" gauges. @@ -788,10 +799,11 @@ func (k Keeper) Distribute(ctx sdk.Context, gauges []types.Gauge) (sdk.Coins, er locksByDenomCache := make(map[string][]lockuptypes.PeriodLock) totalDistributedCoins := sdk.NewCoins() + scratchSlice := make([]*lockuptypes.PeriodLock, 0, 10000) for _, gauge := range gauges { var gaugeDistributedCoins sdk.Coins - filteredLocks := k.getDistributeToBaseLocks(ctx, gauge, locksByDenomCache) + filteredLocks := k.getDistributeToBaseLocks(ctx, gauge, locksByDenomCache, &scratchSlice) // send based on synthetic lockup coins if it's distributing to synthetic lockups var err error if lockuptypes.IsSyntheticDenom(gauge.DistributeTo.Denom) { diff --git a/x/incentives/keeper/iterator.go b/x/incentives/keeper/iterator.go index 649fca91c68..c88816df68b 100644 --- a/x/incentives/keeper/iterator.go +++ b/x/incentives/keeper/iterator.go @@ -63,8 +63,9 @@ func (k Keeper) FinishedGaugesIterator(ctx sdk.Context) sdk.Iterator { } // FilterLocksByMinDuration returns locks whose lock duration is greater than the provided minimum duration. -func FilterLocksByMinDuration(locks []lockuptypes.PeriodLock, minDuration time.Duration) []*lockuptypes.PeriodLock { - filteredLocks := make([]*lockuptypes.PeriodLock, 0, len(locks)) +func FilterLocksByMinDuration(locks []lockuptypes.PeriodLock, minDuration time.Duration, scratchSlice *[]*lockuptypes.PeriodLock) []*lockuptypes.PeriodLock { + *scratchSlice = (*scratchSlice)[:0] + filteredLocks := *scratchSlice for i := range locks { if locks[i].Duration >= minDuration { filteredLocks = append(filteredLocks, &locks[i]) diff --git a/x/incentives/keeper/iterator_test.go b/x/incentives/keeper/iterator_test.go index fe008a80c13..0b5de60ff53 100644 --- a/x/incentives/keeper/iterator_test.go +++ b/x/incentives/keeper/iterator_test.go @@ -27,7 +27,8 @@ func TestFilterLocksByMinDuration(t *testing.T) { } } - filteredLocks := keeper.FilterLocksByMinDuration(locks, minDuration) + scratchSlice := []*lockuptypes.PeriodLock{} + filteredLocks := keeper.FilterLocksByMinDuration(locks, minDuration, &scratchSlice) require.Equal(t, len(locks), len(filteredLocks)) diff --git a/x/superfluid/keeper/epoch.go b/x/superfluid/keeper/epoch.go index 0bd9bfcc100..503847ac721 100644 --- a/x/superfluid/keeper/epoch.go +++ b/x/superfluid/keeper/epoch.go @@ -33,7 +33,7 @@ func (k Keeper) AfterEpochStartBeginBlock(ctx sdk.Context) { ctx.Logger().Info("Distribute Superfluid gauges") //nolint:errcheck - osmoutils.ApplyFuncIfNoError(ctx, func(cacheCtx sdk.Context) error { + osmoutils.UnmeteredApplyFuncIfNoError(ctx, func(cacheCtx sdk.Context) error { k.distributeSuperfluidGauges(cacheCtx) return nil }) @@ -70,7 +70,7 @@ func (k Keeper) MoveSuperfluidDelegationRewardToGauges(ctx sdk.Context) { // To avoid unexpected issues on WithdrawDelegationRewards and AddToGaugeRewards // we use cacheCtx and apply the changes later - _ = osmoutils.ApplyFuncIfNoError(ctx, func(cacheCtx sdk.Context) error { + _ = osmoutils.UnmeteredApplyFuncIfNoError(ctx, func(cacheCtx sdk.Context) error { _, err := k.ck.WithdrawDelegationRewards(cacheCtx, addr, valAddr) if errors.Is(err, distributiontypes.ErrEmptyDelegationDistInfo) { ctx.Logger().Debug("no swaps occurred in this pool between last epoch and this epoch") @@ -80,7 +80,7 @@ func (k Keeper) MoveSuperfluidDelegationRewardToGauges(ctx sdk.Context) { }) // Send delegation rewards to gauges - _ = osmoutils.ApplyFuncIfNoError(ctx, func(cacheCtx sdk.Context) error { + _ = osmoutils.UnmeteredApplyFuncIfNoError(ctx, func(cacheCtx sdk.Context) error { // Note! We only send the bond denom (osmo), to avoid attack vectors where people // send many different denoms to the intermediary account, and make a resource exhaustion attack on end block. bondDenom := k.sk.BondDenom(cacheCtx) diff --git a/x/txfees/keeper/feedecorator.go b/x/txfees/keeper/feedecorator.go index 680e27e60c0..68075e8d2cd 100644 --- a/x/txfees/keeper/feedecorator.go +++ b/x/txfees/keeper/feedecorator.go @@ -244,16 +244,30 @@ func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bo return ctx, errorsmod.Wrapf(sdkerrors.ErrUnknownAddress, "fee payer address: %s does not exist", deductFeesFrom) } + fees := feeTx.GetFee() + + // if we are simulating, set the fees to 1 uosmo as they don't matter. + // set it as coming from the burn addr + if simulate && fees.IsZero() { + fees = sdk.NewCoins(sdk.NewInt64Coin("uosmo", 1)) + burnAcctAddr, _ := sdk.AccAddressFromBech32("osmo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmcn030") + // were doing 1 extra get account call alas + burnAcct := dfd.ak.GetAccount(ctx, burnAcctAddr) + if burnAcct != nil { + deductFeesFromAcc = burnAcct + } + } + // deducts the fees and transfer them to the module account - if !feeTx.GetFee().IsZero() { - err = DeductFees(dfd.txFeesKeeper, dfd.bankKeeper, ctx, deductFeesFromAcc, feeTx.GetFee()) + if !fees.IsZero() { + err = DeductFees(dfd.txFeesKeeper, dfd.bankKeeper, ctx, deductFeesFromAcc, fees) if err != nil { return ctx, err } } ctx.EventManager().EmitEvents(sdk.Events{sdk.NewEvent(sdk.EventTypeTx, - sdk.NewAttribute(sdk.AttributeKeyFee, feeTx.GetFee().String()), + sdk.NewAttribute(sdk.AttributeKeyFee, fees.String()), )}) return next(ctx, tx, simulate) diff --git a/x/txfees/keeper/feedecorator_test.go b/x/txfees/keeper/feedecorator_test.go index 07b5a3ce8ea..e2918040577 100644 --- a/x/txfees/keeper/feedecorator_test.go +++ b/x/txfees/keeper/feedecorator_test.go @@ -146,6 +146,9 @@ func (s *KeeperTestSuite) TestFeeDecorator() { // reset pool and accounts for each test s.SetupTest(false) s.Run(tc.name, func() { + // See DeductFeeDecorator AnteHandler for how this is used + s.FundAcc(sdk.MustAccAddressFromBech32("osmo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmcn030"), sdk.NewCoins(sdk.NewInt64Coin("uosmo", 1))) + preFeeDecoratorTxFeeTrackerValue := s.App.TxFeesKeeper.GetTxFeesTrackerValue(s.Ctx) err := s.SetupTxFeeAnteHandlerAndChargeFee(s.clientCtx, tc.minGasPrices, tc.gasRequested, tc.isCheckTx, tc.isSimulate, tc.txFee) if tc.expectPass { diff --git a/x/txfees/keeper/txfee_filters/arb_tx.go b/x/txfees/keeper/txfee_filters/arb_tx.go index 00928422e70..8c8179a5825 100644 --- a/x/txfees/keeper/txfee_filters/arb_tx.go +++ b/x/txfees/keeper/txfee_filters/arb_tx.go @@ -52,6 +52,42 @@ func (m AffiliateSwapMsg) TokenOutDenom() string { var _ poolmanagertypes.SwapMsgRoute = AffiliateSwapMsg{} +type InputCoin struct { + Denom string `json:"denom"` + Amount string `json:"amount"` +} + +type Slippage struct { + MinOutputAmount string `json:"min_output_amount"` +} + +type ContractSwap struct { + InputCoin InputCoin `json:"input_coin"` + OutputDenom string `json:"output_denom"` + Slippage Slippage `json:"slippage"` +} + +type ContractSwapMsg struct { + ContractSwap `json:"swap"` +} + +// TokenDenomsOnPath implements types.SwapMsgRoute. +func (c ContractSwapMsg) TokenDenomsOnPath() []string { + return []string{c.InputCoin.Denom, c.OutputDenom} +} + +// TokenInDenom implements types.SwapMsgRoute. +func (c ContractSwapMsg) TokenInDenom() string { + return c.InputCoin.Denom +} + +// TokenOutDenom implements types.SwapMsgRoute. +func (c ContractSwapMsg) TokenOutDenom() string { + return c.OutputDenom +} + +var _ poolmanagertypes.SwapMsgRoute = ContractSwapMsg{} + // We check if a tx is an arbitrage for the mempool right now by seeing: // 1) does start token of a msg = final token of msg (definitionally correct) // 2) does it have multiple swap messages, with different tx ins. If so, we assume its an arb. @@ -107,21 +143,47 @@ func isArbTxLooseAuthz(msg sdk.Msg, swapInDenom string, lpTypesSeen map[gammtype contractMessage := msgExecuteContract.GetMsg() // Check that the contract message is an affiliate swap message - if ok := isAffiliateSwapMsg(contractMessage); !ok { + isAffliliateSwap := isAffiliateSwapMsg(contractMessage) + isContractSwap := isContractSwapContractMsg(contractMessage) + + if !isAffliliateSwap && !isContractSwap { return swapInDenom, false } - var affiliateSwapMsg AffiliateSwapMsg - if err := json.Unmarshal(contractMessage, &affiliateSwapMsg); err != nil { - // If we can't unmarshal it, it's not an affiliate swap message - return swapInDenom, false + if isAffliliateSwap { + var affiliateSwapMsg AffiliateSwapMsg + if err := json.Unmarshal(contractMessage, &affiliateSwapMsg); err != nil { + // If we can't unmarshal it, it's not an affiliate swap message + return swapInDenom, false + } + + // Otherwise, we have an affiliate swap message, so we check if it's an arb + affiliateSwapMsg.TokenIn = tokenIn.Denom + swapInDenom, isArb := isArbTxLooseSwapMsg(affiliateSwapMsg, swapInDenom) + if isArb { + return swapInDenom, true + } } - // Otherwise, we have an affiliate swap message, so we check if it's an arb - affiliateSwapMsg.TokenIn = tokenIn.Denom - swapInDenom, isArb := isArbTxLooseSwapMsg(affiliateSwapMsg, swapInDenom) - if isArb { - return swapInDenom, true + if isContractSwap { + var contractSwapMsg ContractSwapMsg + if err := json.Unmarshal(contractMessage, &contractSwapMsg); err != nil { + // If we can't unmarshal it, it's not a contract swap message + return swapInDenom, false + } + + // Otherwise, we have a contract swap message, so we check if it's an arb + swapInDenom, isArb := isArbTxLooseSwapMsg(contractSwapMsg, swapInDenom) + if isArb { + return swapInDenom, true + } + + // Also, check sent tokenIn just in case. + contractSwapMsg.InputCoin.Denom = tokenIn.Denom + swapInDenom, isArb = isArbTxLooseSwapMsg(contractSwapMsg, swapInDenom) + if isArb { + return swapInDenom, true + } } return swapInDenom, false @@ -195,3 +257,29 @@ func isAffiliateSwapMsg(msg []byte) bool { return true } + +// check if this: https://celatone.osmosis.zone/osmosis-1/txs/8D20755D4E009CB72C763963A76886BCCCC5C2EBFC3F57266332710216A0D10D +func isContractSwapContractMsg(msg []byte) bool { + // Check that the contract message is a valid JSON object + jsonObject := make(map[string]interface{}) + err := json.Unmarshal(msg, &jsonObject) + if err != nil { + return false + } + + // check the main key is "swap" + swap, ok := jsonObject["swap"].(map[string]interface{}) + if !ok { + return false + } + + if input_coin, ok := swap["input_coin"].(map[string]interface{}); !ok || len(input_coin) == 0 { + return false + } + + if outputDenom, ok := swap["output_denom"].(string); !ok || len(outputDenom) == 0 { + return false + } + + return true +} diff --git a/x/txfees/keeper/txfee_filters/arb_tx_test.go b/x/txfees/keeper/txfee_filters/arb_tx_test.go index 1c7f24e822a..4268944b702 100644 --- a/x/txfees/keeper/txfee_filters/arb_tx_test.go +++ b/x/txfees/keeper/txfee_filters/arb_tx_test.go @@ -65,6 +65,36 @@ func (suite *KeeperTestSuite) TestIsArbTxLooseAuthz_AffiliateSwapMsg() { suite.Require().True(isArb) } +// Tests that the arb filter is enabled on swap msg. +func (suite *KeeperTestSuite) TestIsArbTxLooseAuthz_SwapMsg() { + contractSwapMsg := &txfee_filters.ContractSwapMsg{ + ContractSwap: txfee_filters.ContractSwap{ + InputCoin: txfee_filters.InputCoin{ + Amount: "2775854", + Denom: "ibc/D1542AA8762DB13087D8364F3EA6509FD6F009A34F00426AF9E4F9FA85CBBF1F", + }, + OutputDenom: "ibc/D1542AA8762DB13087D8364F3EA6509FD6F009A34F00426AF9E4F9FA85CBBF1F", + Slippage: txfee_filters.Slippage{ + MinOutputAmount: "2775854", + }, + }, + } + + msgBz, err := json.Marshal(contractSwapMsg) + suite.Require().NoError(err) + + // https://celatone.osmosis.zone/osmosis-1/txs/8D20755D4E009CB72C763963A76886BCCCC5C2EBFC3F57266332710216A0D10D + executeMsg := &wasmtypes.MsgExecuteContract{ + Contract: "osmo1etpha3a65tds0hmn3wfjeag6wgxgrkuwg2zh94cf5hapz7mz04dq6c25s5", + Sender: "osmo1dldrxz5p8uezxz3qstpv92de7wgfp7hvr72dcm", + Funds: sdk.NewCoins(sdk.NewCoin("ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4", sdk.NewInt(217084399))), + Msg: msgBz, + } + + _, isArb := txfee_filters.IsArbTxLooseAuthz(executeMsg, executeMsg.Funds[0].Denom, map[types.LiquidityChangeType]bool{}) + suite.Require().True(isArb) +} + func (suite *KeeperTestSuite) TestIsArbTxLooseAuthz_OtherMsg() { otherMsg := []byte(`{"update_feed": {}}`)