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

mycelo genesis gingerbread activation fix #2169

Merged
merged 7 commits into from
Aug 22, 2023

Conversation

palango
Copy link
Contributor

@palango palango commented Aug 4, 2023

Description

Fixes gingerbread activation in mycelo.

This results in this genesis config, instead of gingerbreadBlock not being set:

[...]
   "churritoBlock": 0,
   "donutBlock": 0,
   "espressoBlock": 0,
   "gingerbreadBlock": 1,
[...]

@github-actions
Copy link

github-actions bot commented Aug 4, 2023

5861 passed, 1 failed, 45 skipped

Test failures:
  TestTransactionPoolUnderpricing: core
timestamp=2023-08-22T00:36:33+0000 severity=debug   msg="Registering method handler"            method=getAddressFor
timestamp=2023-08-22T00:36:33+0000 severity=debug msg="Registering method handler" method=blockGasLimit
timestamp=2023-08-22T00:36:33+0000 severity=debug msg="Registering method handler" method=getUptimeLookbackWindow
timestamp=2023-08-22T00:36:33+0000 severity=debug msg="Registering method handler" method=intrinsicGasForAlternativeFeeCurrency
timestamp=2023-08-22T00:36:33+0000 severity=debug msg="EVM call successful" to=0x000000000000000000000000000000000000ce10 method=getAddressFor input=0xdd9272338b91d837e1684f7353d73b6197230894243cf869282f722841df96b441303f37 output=0x0000000000000000000000000000000000000000000000000000000000000001
timestamp=2023-08-22T00:36:33+0000 severity=debug msg="EVM call successful" to=0x0000000000000000000000000000000000000001 method=blockGasLimit input=0x7877a797 output=0x0000000000000000000000000000000000000000000000000000000001312d00
tx_pool_test.go:1929: failed to add well priced transaction: txpool is full
timestamp=2023-08-22T00:36:34+0000 severity=info msg="Transaction pool stopped"
This test report was produced by the test-summary action.  Made with ❤️ in Cambridge.

@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.14% 🎉

Comparison is base (df29f4c) 55.08% compared to head (4b8818f) 55.23%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2169      +/-   ##
==========================================
+ Coverage   55.08%   55.23%   +0.14%     
==========================================
  Files         678      678              
  Lines      114321   114321              
==========================================
+ Hits        62978    63141     +163     
+ Misses      47448    47316     -132     
+ Partials     3895     3864      -31     

see 34 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@palango palango marked this pull request as draft August 4, 2023 12:44
@palango palango changed the title Palango/mycelo gingerbread mycelo genesis gingerbread activation fix Aug 4, 2023
@github-actions
Copy link

github-actions bot commented Aug 4, 2023

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

coverage: 46.8% of statements across all listed packages
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:  64.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:  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

@palango palango marked this pull request as ready for review August 4, 2023 15:05
@gastonponti
Copy link
Contributor

We have 2 things there

  1. the zero as disabled in the core contract
  2. the way we have to set the base fee for the specific block of the hardfork

For 1), I didn't wanted to change the logic of what the other team was auditing nor add some hacky ways as infinite o something similar just because of a contract limitation

For 2), the way to calculate the block N depends on the block N-1, and the activation block, is the one that instead of using the block N-1, consumes the state at the beginning of the block
So, if we activate the block in the genesis, it means that the block 1 will rely on searching the baseFee on the genesis, and, I didn't wanted to avoid adding the baseFee in the genesis block
If starts with 1, it's going to search for the state already set in the genesis, and will work as it should

I thought that it was not going to generate any issue, mostly because the chain construction starts at block 1, so technically, any block is constructed as gingerbread, but maybe I should have explained it better

@gastonponti
Copy link
Contributor

Unit tests are passing but are flaky in github actions

@gastonponti gastonponti merged commit 06290db into master Aug 22, 2023
26 of 27 checks passed
@gastonponti gastonponti deleted the palango/mycelo-gingerbread branch August 22, 2023 00:18
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