celo-org / celo-blockchain

Official repository for the golang Celo Blockchain
https://celo.org
GNU Lesser General Public License v3.0
560 stars 198 forks source link

State transition gateway fee check #2173

Closed gastonponti closed 1 year ago

gastonponti commented 1 year ago

Description

Add a check in the state transition for the gateway fee

Backwards compatibility

Part of Gingerbread HF

github-actions[bot] commented 1 year ago

5861 passed, 1 failed, 45 skipped

Test failures:
  TestEthersJSCompatibilityDisableAfterGingerbread: e2e_test
Checking getExchangeSpenders. spenders = [0x000000000000000000000000000000000000d028]
Checking medianRate. numerator = 1000000000000000000000000  denominator = 1000000000000000000000000
Checking gas price minimum. cusdValue = 100000000
Checking getExchangeSpenders. spenders = [0x000000000000000000000000000000000000d028]
Checking medianRate. numerator = 1000000000000000000000000  denominator = 1000000000000000000000000
Checking gas price minimum. cusdValue = 100000000
e2e_test.go:742:
e2e_test.go:744: 
This test report was produced by the test-summary action.  Made with ❤️ in Cambridge.
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 37.50% and project coverage change: +0.19% :tada:

Comparison is base (edbf300) 55.08% compared to head (729e24e) 55.28%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2173 +/- ## ========================================== + Coverage 55.08% 55.28% +0.19% ========================================== Files 678 678 Lines 114297 114321 +24 ========================================== + Hits 62966 63202 +236 + Misses 47441 47256 -185 + Partials 3890 3863 -27 ``` | [Files Changed](https://app.codecov.io/gh/celo-org/celo-blockchain/pull/2173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=celo-org) | Coverage Δ | | |---|---|---| | [core/state\_processor.go](https://app.codecov.io/gh/celo-org/celo-blockchain/pull/2173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=celo-org#diff-Y29yZS9zdGF0ZV9wcm9jZXNzb3IuZ28=) | `81.06% <0.00%> (-0.29%)` | :arrow_down: | | [core/state\_transition.go](https://app.codecov.io/gh/celo-org/celo-blockchain/pull/2173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=celo-org#diff-Y29yZS9zdGF0ZV90cmFuc2l0aW9uLmdv) | `67.93% <0.00%> (-0.56%)` | :arrow_down: | | [core/types/transaction.go](https://app.codecov.io/gh/celo-org/celo-blockchain/pull/2173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=celo-org#diff-Y29yZS90eXBlcy90cmFuc2FjdGlvbi5nbw==) | `54.78% <0.00%> (-0.53%)` | :arrow_down: | | [light/txpool.go](https://app.codecov.io/gh/celo-org/celo-blockchain/pull/2173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=celo-org#diff-bGlnaHQvdHhwb29sLmdv) | `39.17% <0.00%> (-0.17%)` | :arrow_down: | | [miner/block.go](https://app.codecov.io/gh/celo-org/celo-blockchain/pull/2173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=celo-org#diff-bWluZXIvYmxvY2suZ28=) | `51.07% <16.66%> (-0.93%)` | :arrow_down: | | [core/tx\_pool.go](https://app.codecov.io/gh/celo-org/celo-blockchain/pull/2173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=celo-org#diff-Y29yZS90eF9wb29sLmdv) | `72.97% <40.00%> (-0.12%)` | :arrow_down: | | [accounts/abi/bind/backends/simulated.go](https://app.codecov.io/gh/celo-org/celo-blockchain/pull/2173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=celo-org#diff-YWNjb3VudHMvYWJpL2JpbmQvYmFja2VuZHMvc2ltdWxhdGVkLmdv) | `61.16% <100.00%> (+0.13%)` | :arrow_up: | ... and [40 files with indirect coverage changes](https://app.codecov.io/gh/celo-org/celo-blockchain/pull/2173/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=celo-org)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

palango commented 1 year ago

I remember us discussing this. Back then we decided to move that check to the state processor: https://github.com/celo-org/celo-blockchain/blob/b61438b1cf13c7ab2d2bc4696655793c74b2ce3d/core/state_processor.go#L143-L150

github-actions[bot] commented 1 year ago

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

coverage: 50.6% of statements across all listed packages
coverage:  63.2% of statements in consensus/istanbul
coverage:  42.7% of statements in consensus/istanbul/announce
coverage:  55.7% 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:  64.7% of statements in consensus/istanbul/core
coverage:  50.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