-
Notifications
You must be signed in to change notification settings - Fork 334
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
Conversation
@@ -827,6 +827,8 @@ func TestCandidateTransferOwnership(t *testing.T) { | |||
cfg := initCfg(require) | |||
cfg.Genesis.SystemStakingContractV2Address = contractAddress | |||
cfg.Genesis.SystemStakingContractV2Height = 1 | |||
cfg.Genesis.VanuatuBlockHeight = 100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why need this change?
There was a problem hiding this comment.
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
|
please check 1e42b55, re-enable the test marked |
blockchain/blockdao/blockdao.go
Outdated
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()), | ||
}) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
blockchain/blockchain.go
Outdated
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
header
|
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.
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
Test Configuration:
Checklist: