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

CIP 55: Remove Tobin Tax #2029

Merged
merged 2 commits into from
Jun 7, 2023
Merged

CIP 55: Remove Tobin Tax #2029

merged 2 commits into from
Jun 7, 2023

Conversation

palango
Copy link
Contributor

@palango palango commented Mar 2, 2023

Description

Remove tobin tax deduction with next hardfork.

Tested

I tested this manually by running the TestTransferCELO test first without changes. This showed deduction of tobin tax. Then I changed the hardfork flag to always return true and made sure that the tobin tax deduction code is not run anymore.

Related issues

Backwards compatibility

Changes consensus rules and will therefor be enabled with the next hardfork.

@akeyless-target-app
Copy link

Coverage from tests in ./e2e_test/... for ./consensus/istanbul/... at commit c8da8af

coverage: 49.9% of statements across all listed packages
coverage:  63.0% of statements in consensus/istanbul
coverage:  40.1% of statements in consensus/istanbul/announce
coverage:  54.5% of statements in consensus/istanbul/backend
coverage:   0.0% of statements in consensus/istanbul/backend/backendtest
coverage:  24.3% of statements in consensus/istanbul/backend/internal/replica
coverage:  65.7% of statements in consensus/istanbul/core
coverage:  45.0% of statements in consensus/istanbul/db
coverage:   0.0% of statements in consensus/istanbul/proxy
coverage:  64.4% of statements in consensus/istanbul/uptime
coverage:  51.8% of statements in consensus/istanbul/validator
coverage:  79.2% of statements in consensus/istanbul/validator/random
CommentID: 81142c405e

@github-actions
Copy link

github-actions bot commented Apr 11, 2023

Coverage from tests in ./e2e_test/... for ./consensus/istanbul/... at commit 3e61e11

coverage: 48.2% of statements across all listed packages
coverage:  60.0% of statements in consensus/istanbul
coverage:  40.1% of statements in consensus/istanbul/announce
coverage:  54.5% of statements in consensus/istanbul/backend
coverage:   0.0% of statements in consensus/istanbul/backend/backendtest
coverage:  24.3% of statements in consensus/istanbul/backend/internal/replica
coverage:  59.8% of statements in consensus/istanbul/core
coverage:  45.0% of statements in consensus/istanbul/db
coverage:   0.0% of statements in consensus/istanbul/proxy
coverage:  65.0% of statements in consensus/istanbul/uptime
coverage:  51.8% of statements in consensus/istanbul/validator
coverage:  79.2% of statements in consensus/istanbul/validator/random

@github-actions
Copy link

github-actions bot commented Apr 11, 2023

5814 passed, 44 skipped

@palango palango force-pushed the paul/tobin-tax-removal branch from e3081f7 to 57537bc Compare April 20, 2023 09:33
@codecov
Copy link

codecov bot commented Apr 20, 2023

Codecov Report

Patch coverage: 66.99% and project coverage change: +1.05 🎉

Comparison is base (71bdbcf) 54.30% compared to head (d1912c1) 55.35%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2029      +/-   ##
==========================================
+ Coverage   54.30%   55.35%   +1.05%     
==========================================
  Files         692      674      -18     
  Lines      115642   113454    -2188     
==========================================
+ Hits        62795    62808      +13     
+ Misses      49014    46835    -2179     
+ Partials     3833     3811      -22     
Impacted Files Coverage Δ
cmd/devp2p/internal/ethtest/transaction.go 0.00% <0.00%> (ø)
cmd/geth/chaincmd.go 0.00% <0.00%> (ø)
cmd/geth/main.go 21.39% <ø> (+0.91%) ⬆️
cmd/geth/usage.go 10.90% <ø> (ø)
cmd/utils/flags.go 2.56% <0.00%> (ø)
consensus/istanbul/utils.go 47.10% <ø> (+1.13%) ⬆️
contracts/currency/currency.go 55.00% <ø> (ø)
contracts/election/election.go 25.00% <ø> (ø)
contracts/epoch_rewards/epoch_rewards.go 88.88% <ø> (ø)
contracts/freezer/freezer.go 70.00% <ø> (ø)
... and 48 more

... and 27 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@palango palango force-pushed the paul/tobin-tax-removal branch from 57537bc to 2cedb9d Compare April 26, 2023 13:39
@palango palango marked this pull request as ready for review April 26, 2023 13:39
@palango palango changed the title Draft: tobin tax removal Remove Tobin Tax Apr 26, 2023
@palango palango changed the title Remove Tobin Tax CIP 55: Remove Tobin Tax Apr 26, 2023
@palango palango requested a review from eelanagaraj May 3, 2023 10:41
core/vm/vmcontext/context.go Outdated Show resolved Hide resolved
Copy link
Contributor

@eelanagaraj eelanagaraj left a comment

Choose a reason for hiding this comment

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

LG! Can you add a second test case, i.e. (TestTransferCELOPreG, TestTransferCELOPostG) which transfer before/after the G hardfork and checks expected behavior? I think it'd be really useful to codify your testing (from the description) & have this going forwards to make sure we don't inadvertently mess with the old logic in the future. Wdyt? Happy to approve after that!

As far as your question/comment, I think maybe slightly preferable to move the debug setting to the top of the func (for easier modification later when redoing all the SharedEVMRunner trace fixes) but I think totally up to you!

core/vm/vmcontext/context.go Outdated Show resolved Hide resolved
@palango
Copy link
Contributor Author

palango commented May 4, 2023

I think it'd be really useful to codify your testing (from the description) & have this going forwards to make sure we don't inadvertently mess with the old logic in the future. Wdyt? Happy to approve after that!

I agree it would be super useful, but the only way I see to do it involves a full e2e test at the moment, because we don't have the necessary setup logic for units/integration tests to setup the whole celo contract infrastructure.

And even the e2e setup is quite involved as it requires the reserve to be setup in a way to trigger the tobin tax payment, besides the whole governance setup.

@palango palango force-pushed the paul/tobin-tax-removal branch from 471388b to a3358e8 Compare May 5, 2023 13:06
@palango palango force-pushed the paul/tobin-tax-removal branch from 6000f6e to b924af7 Compare June 6, 2023 10:06
@palango palango force-pushed the paul/tobin-tax-removal branch from b924af7 to d1912c1 Compare June 6, 2023 12:15
@palango palango requested review from eelanagaraj and karlb June 6, 2023 13:14
@palango palango force-pushed the paul/tobin-tax-removal branch from 7d2e4d8 to d1912c1 Compare June 6, 2023 13:28
Copy link
Contributor

@karlb karlb left a comment

Choose a reason for hiding this comment

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

Looks straightforward enough.

@palango palango merged commit 8454fc7 into master Jun 7, 2023
@palango palango deleted the paul/tobin-tax-removal branch June 7, 2023 08:31
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.

3 participants