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

[evm] enable cancun at Vanuatu #4369

Merged
merged 14 commits into from
Sep 26, 2024
Merged

[evm] enable cancun at Vanuatu #4369

merged 14 commits into from
Sep 26, 2024

Conversation

envestcc
Copy link
Member

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #(issue)

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Code refactor or improvement
  • [] Breaking change (fix or feature that would cause a new or changed behavior of existing functionality)
  • [] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [] make test
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

@@ -827,6 +827,8 @@ func TestCandidateTransferOwnership(t *testing.T) {
cfg := initCfg(require)
cfg.Genesis.SystemStakingContractV2Address = contractAddress
cfg.Genesis.SystemStakingContractV2Height = 1
cfg.Genesis.VanuatuBlockHeight = 100
Copy link
Member

Choose a reason for hiding this comment

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

why need this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

block interval is set to a big time in this case, the default height will cause timestamp overflow

Copy link

@dustinxie
Copy link
Member

please check 1e42b55, re-enable the test marked
// TODO: re-enable this test when enable Cancun

@envestcc envestcc marked this pull request as ready for review September 19, 2024 13:30
@envestcc envestcc requested review from CoderZhi, Liuhaai and a team as code owners September 19, 2024 13:30
Comment on lines 300 to 307
g := genesis.MustExtractGenesisContext(ctx)
ctx = protocol.WithBlockCtx(ctx, protocol.BlockCtx{
BlockHeight: blk.Height(),
BlockTimeStamp: blk.Timestamp(),
Producer: blk.PublicKey().Address(),
GasLimit: g.BlockGasLimitByHeight(blk.Height()),
BlobBaseFee: *block.CalcBlobFee(blk.ExcessBlobGas()),
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

why the blockctx was not needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Previously, blockCtx was set inside the factory, but now, due to the introduction of BlobBaseFee requiring the previous block for initialization, and since the factory does not have this information internally, the setting has been moved ahead here in blockdao.

@@ -382,7 +384,11 @@ func (bc *blockchain) MintNewBlock(timestamp time.Time) (*block.Block, error) {
if err != nil {
return nil, err
}
ctx = bc.contextWithBlock(ctx, bc.config.ProducerAddress(), newblockHeight, timestamp)
prevHeader, err := bc.dao.HeaderByHeight(tipHeight)
Copy link
Collaborator

Choose a reason for hiding this comment

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

header

Copy link

@envestcc envestcc merged commit 4b17873 into iotexproject:master Sep 26, 2024
3 checks passed
@envestcc envestcc deleted the eip5656 branch September 26, 2024 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants