Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(post): burn cosmos transaction fees #2128

Merged
merged 21 commits into from Dec 4, 2023
Merged

Conversation

GAtom22
Copy link
Contributor

@GAtom22 GAtom22 commented Dec 4, 2023

Description


Closes #XXX

fedekunze and others added 17 commits November 8, 2023 10:47
* add posthandler unit test suite

* add HandlerOptions validation tests

* add Burner auth to FeeCollectorName

* add test setup + post handler test

* add burn tests

* run make format

* add tests with balance check for post burn

* fix

* run make format

* linter

---------

Co-authored-by: 0xstepit <0xstepit@users.noreply.github.com>
Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>
Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>
Copy link

codecov bot commented Dec 4, 2023

Codecov Report

Merging #2128 (cbae011) into main (e0d41fe) will increase coverage by 0.00%.
Report is 2 commits behind head on main.
The diff coverage is 50.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2128   +/-   ##
=======================================
  Coverage   69.13%   69.14%           
=======================================
  Files         303      303           
  Lines       23710    23718    +8     
=======================================
+ Hits        16393    16399    +6     
- Misses       6418     6419    +1     
- Partials      899      900    +1     
Files Coverage Δ
app/post/burn.go 66.66% <66.66%> (+2.66%) ⬆️
app/upgrades/v16/upgrades.go 3.12% <0.00%> (ø)

@GAtom22 GAtom22 marked this pull request as ready for review December 4, 2023 13:20
@GAtom22 GAtom22 requested a review from a team as a code owner December 4, 2023 13:20
@GAtom22 GAtom22 requested review from facs95, 0xstepit and Vvaradinov and removed request for a team December 4, 2023 13:20
@fedekunze fedekunze merged commit f4ede8d into main Dec 4, 2023
34 of 35 checks passed
@fedekunze fedekunze deleted the fedekunze/burn-cosmos-fees branch December 4, 2023 13:54
@Vvaradinov
Copy link
Contributor

https://github.com/Mergifyio backport release/v16.0.x

Copy link
Contributor

mergify bot commented Dec 11, 2023

backport release/v16.0.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Dec 11, 2023
* feat(post): burn cosmos transaction fees

* changelog

* handler options

* tests(post): unit test for burn cosmos transaction fees. (#2027)

* add posthandler unit test suite

* add HandlerOptions validation tests

* add Burner auth to FeeCollectorName

* add test setup + post handler test

* add burn tests

* run make format

* add tests with balance check for post burn

* fix

* run make format

* linter

---------

Co-authored-by: 0xstepit <0xstepit@users.noreply.github.com>

* Update app/post/post.go

Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>

* format test

* add safety check

* check for zero len coins

* fix(post): fix post handler

* update imports

* update changelog

---------

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>
Co-authored-by: 0xstepit <0xstepit@users.noreply.github.com>
Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>
(cherry picked from commit f4ede8d)
Vvaradinov pushed a commit that referenced this pull request Dec 11, 2023
feat(post): burn cosmos transaction fees (#2128)

* feat(post): burn cosmos transaction fees

* changelog

* handler options

* tests(post): unit test for burn cosmos transaction fees. (#2027)

* add posthandler unit test suite

* add HandlerOptions validation tests

* add Burner auth to FeeCollectorName

* add test setup + post handler test

* add burn tests

* run make format

* add tests with balance check for post burn

* fix

* run make format

* linter

---------

Co-authored-by: 0xstepit <0xstepit@users.noreply.github.com>

* Update app/post/post.go

Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>

* format test

* add safety check

* check for zero len coins

* fix(post): fix post handler

* update imports

* update changelog

---------

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>
Co-authored-by: 0xstepit <0xstepit@users.noreply.github.com>
Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>
(cherry picked from commit f4ede8d)

Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com>
MalteHerrmann added a commit that referenced this pull request Jan 30, 2024
* chore(p256): adjust p256 precompile address (backport #2110) (#2112)

chore(p256): adjust p256 precompile address (#2110)

* adjust p256 precompile address

* address linter

* add changelog entry

(cherry picked from commit 56b1993)

Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>

* revert deprecation of EIP-712 ante handler for v16.0.0-rc1 (#2113)

revert deprecattion of EIP-712 ante handler

* chore(proto): run make proto-all (backport #2111) (#2114)

chore(proto): run make proto-all (#2111)

run make proto-all

Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com>
(cherry picked from commit 836a6d7)

Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>

* feat(stride,osmosis): enable stride and osmosis outposts during upgrade (backport #2117) (#2120)

feat(stride,osmosis): enable stride and osmosis outposts during upgrade (#2117)

* enable stride and osmosis outposts during upgrade

* add changelog entry

(cherry picked from commit 303aa87)

Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>

* chore(osmosis): add osmosis outpost to available EVM extensions (backport #2109) (#2119)

chore(osmosis): add osmosis outpost to available EVM extensions (#2109)

* adjust call signature to match other precompiles

* add osmosis outpost to available extensions

* update channel ID for osmosis outpost

* adjust expected gas values

* add changelog entry

(cherry picked from commit 7761a25)

# Conflicts:
#	CHANGELOG.md

Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>

* chore(post): Revert post handler changes for v16.0.0-rc1 (#2118)

Revert "feat(post): burn cosmos transaction fees (#2013)"

This reverts commit 3dd60c0

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* chore(ante): revert mono ante handler for v16.0.0-rc1 (#2116)

revert mono ante handler

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* imp(changelog): Changelog clean up (backport #2107) (#2123)

* imp(changelog): Changelog clean up (#2107)

* wip clean up

* wip clean up 2

* add precompile suffix to make distinction between modules and precompiles clear

* move some more state breaking changes to section

* Update CHANGELOG.md

Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>

* adjust entry

---------

Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
(cherry picked from commit 5de9abf)

# Conflicts:
#	CHANGELOG.md

* fix merge conflicts

---------

Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>
Co-authored-by: MalteHerrmann <malte@evmos.org>

* chore(upgrade): Activate bech32 precompile during upgrade (#2124)

* chore(upgrade): Activate bech32 precompile

* format

* fix: add both activations together

* CHANGELOG

* fix(incentives): remove incentives burning logic from upgrade handler (backport #2131) (#2132)

fix(incentives): remove incentives burning logic from upgrade handler (#2131)

* remove incentives burning logic from upgrade handler

* add changelog entry

(cherry picked from commit b587e58)

Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>

* chore(upgrade): Prepare v16.0.0-rc1 (#2133)

* prepare v16.0.0-rc1

* fix changelog

* tests(e2e): Osmosis e2e tests (backport #2029) (#2170)

tests(e2e): Osmosis e2e tests (#2029)

* cosmoswasm artifacts

* first pass

* run make format

* add comments

* run make format

* fix lint

* fix wrong params

* lint code

* lint code

* refactor utils func

* update osmosis ver

* update compile contracts script

* enable osmosis outpost

* update bins & add contract patch

* remove unnecessary dump to file

* update app.go with bank keeper in availablePrecompiles

* refactor

* update test setup for contract v1

* remove unnecessary changes

* make format

* fix lint issues

* fix lint issues

* add channel patch

* update comment

* fix lint issues

* fix lint issues

* Apply suggestions from code review

Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>

* address review comments

* fix onFailDelivery unit test

* fix gosec issues

* Update precompiles/outposts/osmosis/types.go

---------

Co-authored-by: facs95 <facs95@users.noreply.github.com>
Co-authored-by: tom <tomasguerraalda@hotmail.com>
Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com>
Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
(cherry picked from commit 8a890e2)

Co-authored-by: Freddy Caceres <facs95@gmail.com>

* Add channel selector from chainID (backport #2172) (#2173)

* Add channel selector from chainID (#2172)

* bump cosmos sdk fork and port selector

* update xcs contract testnet

* add CHANGELOG entry

(cherry picked from commit f9754af)

# Conflicts:
#	CHANGELOG.md

* CHANGELOG FIX

---------

Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>
Co-authored-by: Vlad <vladislav.varadinov@gmail.com>

* imp(docker): update jq and curl dependencies (backport #2168) (#2177)

imp(docker): update jq and curl dependencies (#2168)

update jq and curl dependencies

(cherry picked from commit cc07bbb)

Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>

* chore: update gomod2nix (#2174)

Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com>

* imp(inflation): Reduce inflation by 2/3 (backport #2137) (#2178)

imp(inflation): Reduce inflation by 2/3 (#2137)

* imp(inflation): Reduce inflation by 2/3

* changelog

* fix(tests): fix integration tests

* fix(tests): add back case for incentives

* fix(tests): fix linter

* Update x/inflation/v1/keeper/hooks.go

Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>

---------

Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com>
Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>
(cherry picked from commit 05cf01d)

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* chore(tests): update patches (#2179)

chore: update patches

* feat(post): burn cosmos transaction fees (backport #2128) (#2181)

feat(post): burn cosmos transaction fees (#2128)

* feat(post): burn cosmos transaction fees

* changelog

* handler options

* tests(post): unit test for burn cosmos transaction fees. (#2027)

* add posthandler unit test suite

* add HandlerOptions validation tests

* add Burner auth to FeeCollectorName

* add test setup + post handler test

* add burn tests

* run make format

* add tests with balance check for post burn

* fix

* run make format

* linter

---------

Co-authored-by: 0xstepit <0xstepit@users.noreply.github.com>

* Update app/post/post.go

Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>

* format test

* add safety check

* check for zero len coins

* fix(post): fix post handler

* update imports

* update changelog

---------

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>
Co-authored-by: 0xstepit <0xstepit@users.noreply.github.com>
Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>
(cherry picked from commit f4ede8d)

Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com>

* chore(upgrade): Create v16-rc2 upgrade case and modify constants (#2175)

* chore(upgrade): delete old upgrade handler and logic

* fix: delete

* fix: create another upgrade name so we can keep mainnet upgrade name

* UPDATE CHANGELOG

* UPDATE CHANGELOG

* UPDATE CHANGELOG

---------

Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>

* fix(upgrade): Add upgrade handler for rc2 (#2184)

* fix: add upgrade handler for rc2

* fix: add missing

* fix(outposts): Handle cases for input and output denoms without token pair lookup (#2185)

* fix: add bond denom to outposts directly from staking keeper

* format and lint

* fix: comment out stride unit tests that don't apply

* fix: cases for input and output denom

* fix: use IBC denom instead of ERC20 address or plain denom

* fix: remove ERC20 token pair check from liquid stake transaction and replace with the hardcoded wevmos address check

* fix: stride tests

* minor fix

* fix: osmosis setup

* fix: adapt tests to pass for both Outposts

* fix: refactor to only use hardcoded WEVMOS

* remove unnecessary comment

* fix: no more need for custom error

* fix: remove commented out lines

* APPLY CHANGES FROM CODE REVIEW

* update e2e test patches

* update e2e test

---------

Co-authored-by: stepit <stefanofrancesco.pitton@gmail.com>
Co-authored-by: tom <tomasguerraalda@hotmail.com>

* fix(feecollector): Add FeeCollector burner role, UpgradeHandler for fork (#2186)

* fix(upgrade): add fee collector burner role

* add hard fork logic

* make format

* apply changes from code review

* fix: delete the only RegisterIncentive proposal from the store to fix the proposals query

* fix: add the iteration of proposals and deletion of RegisterIncentive proposal type

* fix: remove old fork block height

* fix: push test thus far

* fix: add test for deletion of proposal

* FORMAT AND LINT

* fix: add license to new file

* merge + conflicts

* fix typo

* fix: add comments

* fix: add error checking

* fix: delete old code and comment out deletion + tests

* FORMAT AND LINT

* fix: add hardfork height and remove protos

* fix: add final testnet hardfork height

---------

Co-authored-by: tom <tomasguerraalda@hotmail.com>
Co-authored-by: stepit <stefanofrancesco.pitton@gmail.com>

* chore(upgrade): Prepare v16-rc4 UpgradeHandler (#2188)

* add rc3 tag preparation

* fix: add upgrade height for Dec 14th 2023, 10:13 AM

* fix: add RC4 changes

* FORMAT AND LINT

* FORMAT AND LINT

* Update app/upgrades/v16/upgrades.go

Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com>

* Update app/forks.go

Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>

* update golang version in go linter

* Revert "update golang version in go linter"

This reverts commit 96636fd.

---------

Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com>
Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>
Co-authored-by: tom <tomasguerraalda@hotmail.com>

* chore(upgrade): Add changelog entries for upgrade (#2189)

* add rc3 tag preparation

* fix: add upgrade height for Dec 14th 2023, 10:13 AM

* chore(changelog): Changelog entry

* fix(osmosis-outpost): Fix XCS contract address (#2192)

* add rc3 tag preparation

* fix: add upgrade height for Dec 14th 2023, 10:13 AM

* fix(outposts): add correct XCS contract

* CHANGELOG

* CHANGELOG

* chore(upgrade): remove deprecated gov proposals (incentives) (backport #2196) (#2201)

* chore(upgrade): remove deprecated gov proposals (incentives) (#2196)

* wip - add remove proposal logic

* add incentives code

* keep only incentives types

* update tests

* update upgrade logic

* remove unnecessary types

* update upgrade logic

* update comments

* make format

* fix lint issues

* add changelog entry

* update upgrade logic

(cherry picked from commit 7dfc497)

# Conflicts:
#	app/app.go
#	app/upgrades/v16/proposals.go
#	app/upgrades/v16/upgrades.go
#	app/upgrades/v16/upgrades_test.go

* fix conflicts

---------

Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com>
Co-authored-by: tom <tomasguerraalda@hotmail.com>

* fix(release): Add required Outpost refactors to release branch (#2220)

* add rc3 tag preparation

* fix: add upgrade height for Dec 14th 2023, 10:13 AM

* fix(outposts): add correct XCS contract

* fix: add outpost refactored logic

* fix(test): fix register Coin helper

* fix: remove unused file

* fix: refactor nix tests

* update osmosis outpost e2e test

* fix stride outpost input params order

* update test setup for stride

* revert remove RegisterCoinProposal

* fix app.go

* fix: use xcs contract addr

---------

Co-authored-by: tom <tomasguerraalda@hotmail.com>

* chore(upgrade): enable burning the usage incentives pool in the v16 handler (backport #2221) (#2224)

* chore(upgrade): enable burning the usage incentives pool in the v16 handler (#2221)

* enable burning the usage incentives pool in the v16 handler

* add changelog entry

(cherry picked from commit e69abb0)

# Conflicts:
#	CHANGELOG.md
#	app/upgrades/v16/upgrades.go

* fix merge conflicts

* pass bank keeper to upgrade handler

---------

Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>
Co-authored-by: MalteHerrmann <malte@evmos.org>

* fix(outpost): Add comments to structs and ValidateBasic condition (backport #2223) (#2225)

* fix(outpost): Add comments to structs and ValidateBasic condition (#2223)

* fix(outpost): Add comments to structs and ValidateBasic condition

* fix: format, lint and changelog

* Update precompiles/outposts/stride/IStrideOutpost.sol

Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>

---------

Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>
(cherry picked from commit 56e062b)

# Conflicts:
#	CHANGELOG.md

* CHANGELOG fix

---------

Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com>

* chore(upgrade): Prepare v16.0.0-rc5 (#2226)

* reduce upgrade handler for rc5

* adjust upgrade name

* adjust changelog

* add logic specifically for rc5

* Revert "adjust upgrade name"

This reverts commit 6a11af4.

* Revert "reduce upgrade handler for rc5"

This reverts commit 9ce1876.

* adjust upgrade info

* chore(p256): adjust p256 precompile address (backport #2228) (#2229)

* chore(p256): adjust p256 precompile address (#2228)

* adjust p256 precompile address

* add changelog entry

* move changelog entry to improvements

(cherry picked from commit 7821cb8)

* move changelog to correct place

---------

Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>
Co-authored-by: MalteHerrmann <malte@evmos.org>

* chore(upgrade): combine v16 upgrade handlers (#2231)

* combine upgrade handlers into one

* remove rc upgrade constants and comment out hard fork logic

* update changelog - remove not-included PR

---------

Co-authored-by: tom <tomasguerraalda@hotmail.com>

* chore(changelog): Prepare changelog for v16.0.0 (#2239)

prepare changelog for v16.0.0

* chore: add burned coins metrics (backport #2246) (#2248)

* chore: add burnt coins metrics (#2246)

* add burnt coins metrics

* add changelog entry

* add test case

* small fix

* small refactor

(cherry picked from commit ea75cb9)

# Conflicts:
#	CHANGELOG.md

* fix conflicts

* remove unincluded change

* set telemetry on deliver tx only

---------

Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com>
Co-authored-by: tom <tomasguerraalda@hotmail.com>

* chore(upgrade): Prepare changelog for v16.0.1 (#2257)

prepare changelog

* fix(inflation): update query to return correct inflation value (backport #2269) (#2272)

* fix(inflation): update query to return correct inflation value (#2269)

* fix query and update tests

* fix test

* add docstring and update CHANGELOG

(cherry picked from commit eab8194)

# Conflicts:
#	CHANGELOG.md

* fix CHANGELOG conflict

* fix CHANGELOG

---------

Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>
Co-authored-by: stepit <stefanofrancesco.pitton@gmail.com>

* fix changelog

* fix failed merge

* copy ante folder from main

* revert changes in testutils

* revert changes to werc20 precompile

* remove duplicate function definitions in Python utils

* Update CHANGELOG.md

* remove outdated nix files

* Apply suggestions from code review

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com>
Co-authored-by: Freddy Caceres <facs95@gmail.com>
Co-authored-by: stepit <48993133+0xstepit@users.noreply.github.com>
Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com>
Co-authored-by: stepit <stefanofrancesco.pitton@gmail.com>
Co-authored-by: tom <tomasguerraalda@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants