Closed carterqw2 closed 10 months ago
Test failures: |
---|
TestTransactionIndices: core
|
TestEthersJSCompatibility: e2e_test
|
TestEthersJSCompatibilityDisableAfterGingerbread: e2e_test
|
TestEthersJSCompatibilityDisableBeforeGingerbread: e2e_test
|
This test report was produced by the test-summary action. Made with ❤️ in Cambridge. |
Attention: 48 lines
in your changes are missing coverage. Please review.
Comparison is base (
6731538
) 55.09% compared to head (347d8bc
) 55.09%.
Files | Patch % | Lines |
---|---|---|
cmd/utils/flags.go | 0.00% | 25 Missing :warning: |
miner/block.go | 44.82% | 14 Missing and 2 partials :warning: |
core/sys_context.go | 0.00% | 7 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Coverage from tests in ./e2e_test/...
for ./consensus/istanbul/...
at commit 99c7190d9c602a92fbe9ffc1a4e583eae8f65259
coverage: 57.2% of statements in consensus/istanbul coverage: 23.7% of statements in consensus/istanbul/announce coverage: 54.3% 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.1% 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.2% 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
Description
In the light of the recent growth of interest in extending of the gas currencies allowlist, we need to implement a protective mechanism that would allow validators more precisely control the percentage of available block space used paid with an alternative fee currency (other than CELO).
Goals
Proposed Solution
Add a flag
celo.feecurrency.limits
with a comma-separated currency addresshash=limit
mappings for currencies listed in theFeeCurrencyWhitelist
contract, where limit represents the maximal fraction of the block gas limit as a float point number available for the given fee currency.For example,
--celo.feecurrency.limits=0x765DE816845861e75A25fCA122bb6898B8B1282a=0.1,0xD8763CBa276a3738E6DE85b4b3bF5FDed6D6cA73=0.05;0xEd6961928066D3238134933ee9cDD510Ff157a6e=0
.Add an overridable default value
celo.feecurrency.default
(initially set to 0.5 ) for currencies not listed in the map, meaning that if not specified otherwise, a TX with a given fee currency can take up to 50% of the block space.CELO token doesn’t have a limit.
Default Configuration
Based on historical data we will use this default configuration:
It imposes the following limits:
cUSD
up to 90%cEUR
up to 50%cREAL
up to 50% any other token except CELO - 50%Other changes
No.
Tested
Added tests.
Backwards compatibility
Yes, both flags have default options. Behavior-wise, the effect should be similar to what we observe now.
It would be easier to review by following the commits.