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

[BP: release/v6 <- #202] refactor: remove the ability to take a fee for each forwarded packet #206

Merged
merged 3 commits into from
Aug 6, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Jul 23, 2024

Previously the PFM had a parameter that was used to take a percentage of each transfer that was forward through it, which would then be sent to the community pool. After many years of being used on many chains we found that absolutely no one was utilizing this feature and that it likely didn't make sense in the context of how PFM was actually used out in the wild. Rather than trying to maintain this feature we decided that we would just remove this functionality from the PFM all together.


This is an automatic backport of pull request #202 done by Mergify.

…202)

* refactor: remove the ability to take a fee that is sent to the community pool

* fix: mocks

* fix: remove WithFee unit test (no longer used due to fee refactor)

* fix(e2e): upgrade test

---------

Co-authored-by: Reece Williams <reecepbcups@gmail.com>
(cherry picked from commit 26d8080)

# Conflicts:
#	middleware/packet-forward-middleware/e2e/upgrade_test.go
#	middleware/packet-forward-middleware/go.mod
#	middleware/packet-forward-middleware/packetforward/client/cli/cli.go
#	middleware/packet-forward-middleware/packetforward/keeper/genesis.go
#	middleware/packet-forward-middleware/packetforward/keeper/grpc_query.go
#	middleware/packet-forward-middleware/packetforward/keeper/keeper.go
#	middleware/packet-forward-middleware/packetforward/keeper/params.go
#	middleware/packet-forward-middleware/packetforward/module.go
#	middleware/packet-forward-middleware/packetforward/module_test.go
#	middleware/packet-forward-middleware/packetforward/types/codec.go
#	middleware/packet-forward-middleware/packetforward/types/expected_keepers.go
#	middleware/packet-forward-middleware/packetforward/types/genesis.pb.go
#	middleware/packet-forward-middleware/packetforward/types/params.go
#	middleware/packet-forward-middleware/packetforward/types/query.pb.go
#	middleware/packet-forward-middleware/packetforward/types/query.pb.gw.go
#	middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto
#	middleware/packet-forward-middleware/proto/packetforward/v1/query.proto
#	middleware/packet-forward-middleware/test/mock/bank_keeper.go
#	middleware/packet-forward-middleware/test/mock/channel_keeper.go
#	middleware/packet-forward-middleware/test/mock/distribution_keeper.go
#	middleware/packet-forward-middleware/test/mock/ibc_module.go
#	middleware/packet-forward-middleware/test/mock/ics4_wrapper.go
#	middleware/packet-forward-middleware/test/mock/transfer_keeper.go
#	middleware/packet-forward-middleware/test/setup.go
#	middleware/packet-forward-middleware/testing/simapp/app.go
#	middleware/packet-forward-middleware/testing/simapp/upgrades/upgrades.go
Copy link
Author

mergify bot commented Jul 23, 2024

Cherry-pick of 26d8080 has failed:

On branch mergify/bp/release/v6/pr-202
Your branch is up to date with 'origin/release/v6'.

You are currently cherry-picking commit 26d8080.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   middleware/packet-forward-middleware/Makefile
	modified:   middleware/packet-forward-middleware/e2e/forward_timeout_test.go
	modified:   middleware/packet-forward-middleware/packetforward/types/genesis.go
	modified:   middleware/packet-forward-middleware/packetforward/types/keys.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   middleware/packet-forward-middleware/e2e/upgrade_test.go
	both modified:   middleware/packet-forward-middleware/go.mod
	deleted by them: middleware/packet-forward-middleware/packetforward/client/cli/cli.go
	both modified:   middleware/packet-forward-middleware/packetforward/keeper/genesis.go
	deleted by them: middleware/packet-forward-middleware/packetforward/keeper/grpc_query.go
	both modified:   middleware/packet-forward-middleware/packetforward/keeper/keeper.go
	deleted by them: middleware/packet-forward-middleware/packetforward/keeper/params.go
	both modified:   middleware/packet-forward-middleware/packetforward/module.go
	both modified:   middleware/packet-forward-middleware/packetforward/module_test.go
	deleted by us:   middleware/packet-forward-middleware/packetforward/types/codec.go
	both modified:   middleware/packet-forward-middleware/packetforward/types/expected_keepers.go
	both modified:   middleware/packet-forward-middleware/packetforward/types/genesis.pb.go
	deleted by them: middleware/packet-forward-middleware/packetforward/types/params.go
	deleted by them: middleware/packet-forward-middleware/packetforward/types/query.pb.go
	deleted by them: middleware/packet-forward-middleware/packetforward/types/query.pb.gw.go
	both modified:   middleware/packet-forward-middleware/proto/packetforward/v1/genesis.proto
	deleted by them: middleware/packet-forward-middleware/proto/packetforward/v1/query.proto
	both modified:   middleware/packet-forward-middleware/test/mock/bank_keeper.go
	both modified:   middleware/packet-forward-middleware/test/mock/channel_keeper.go
	deleted by them: middleware/packet-forward-middleware/test/mock/distribution_keeper.go
	both modified:   middleware/packet-forward-middleware/test/mock/ibc_module.go
	both modified:   middleware/packet-forward-middleware/test/mock/ics4_wrapper.go
	both modified:   middleware/packet-forward-middleware/test/mock/transfer_keeper.go
	both modified:   middleware/packet-forward-middleware/test/setup.go
	deleted by us:   middleware/packet-forward-middleware/testing/simapp/app.go
	deleted by us:   middleware/packet-forward-middleware/testing/simapp/upgrades/upgrades.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot assigned jtieri Jul 23, 2024
}
)

func TestPFMUpgrade(t *testing.T) {
Copy link
Member

@Reecepbcups Reecepbcups Aug 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think this file is run at all here (due to not adding the gh ci), it can probably be removed safely for anything which is not main branch

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call out, there may be a bit of dead code at this point. may need to just do an audit of that while we rectify any issues discovered in the audit.

@mergify mergify bot merged commit 6e1d3ea into release/v6 Aug 6, 2024
4 checks passed
@mergify mergify bot deleted the mergify/bp/release/v6/pr-202 branch August 6, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants