forked from ethereum-optimism/op-geth
-
Notifications
You must be signed in to change notification settings - Fork 6
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
R4R: metatx bugfix #83
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1195f7a
import upgrade to metatx to ensure sponsor doesn't equal to tx sender
abelliumnt a16aca1
rename upgrade name
abelliumnt 3c17af4
fix relaced tx cost
abelliumnt 12250d0
generate sponsor event
abelliumnt 757949a
bugfix: metatx gas undercharge && estimate insufficient
pandainzoo a72614d
add testnet network upgrade config
pandainzoo efd624e
modify testnet upgrade time
pandainzoo 8c7b120
fix metatx event
pandainzoo be781ff
fix metatx estimate
pandainzoo d7cdd5e
fix estimate gas
pandainzoo 294678f
fix estimate gas
pandainzoo 2fe2d0d
Merge remote-tracking branch 'remotes/origin/feature/eigenda' into me…
pandainzoo 8d737a8
add qa3 upgrade info
pandainzoo 6d2a1d4
Merge branch 'develop' into metatx_bigfix
pandainzoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,34 +11,53 @@ var ( | |
ChainID: params.MantleMainnetChainId, | ||
BaseFeeTime: u64Ptr(0), | ||
BVMETHMintUpgradeTime: u64Ptr(0), | ||
MetaTxUpgradeTime: u64Ptr(0), | ||
MetaTxV2UpgradeTime: u64Ptr(0), | ||
MetaTxV3UpgradeTime: u64Ptr(0), //TODO set upgrade timestamp | ||
} | ||
|
||
MantleSepoliaUpgradeConfig = MantleUpgradeChainConfig{ | ||
ChainID: params.MantleSepoliaChainId, | ||
BaseFeeTime: u64Ptr(1_704_891_600), | ||
BVMETHMintUpgradeTime: nil, //TODO set upgrade timestamp | ||
MetaTxUpgradeTime: nil, //TODO set upgrade timestamp | ||
MetaTxV2UpgradeTime: nil, //TODO set upgrade timestamp | ||
MetaTxV3UpgradeTime: nil, //TODO set upgrade timestamp | ||
} | ||
MantleSepoliaQA3UpgradeConfig = MantleUpgradeChainConfig{ | ||
ChainID: params.MantleSepoliaQA3ChainId, | ||
BaseFeeTime: u64Ptr(0), | ||
BVMETHMintUpgradeTime: u64Ptr(0), | ||
MetaTxV2UpgradeTime: u64Ptr(0), | ||
MetaTxV3UpgradeTime: u64Ptr(1717689600), | ||
} | ||
MantleSepoliaQA9UpgradeConfig = MantleUpgradeChainConfig{ | ||
ChainID: params.MantleSepoliaQA9ChainId, | ||
BaseFeeTime: u64Ptr(0), | ||
BVMETHMintUpgradeTime: u64Ptr(0), | ||
MetaTxV2UpgradeTime: u64Ptr(0), | ||
MetaTxV3UpgradeTime: u64Ptr(1716962400), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is QA9, already upgrade |
||
} | ||
MantleLocalUpgradeConfig = MantleUpgradeChainConfig{ | ||
ChainID: params.MantleLocalChainId, | ||
BaseFeeTime: u64Ptr(0), | ||
BVMETHMintUpgradeTime: u64Ptr(0), | ||
MetaTxUpgradeTime: u64Ptr(0), | ||
MetaTxV2UpgradeTime: u64Ptr(0), | ||
MetaTxV3UpgradeTime: u64Ptr(0), | ||
} | ||
MantleDefaultUpgradeConfig = MantleUpgradeChainConfig{ | ||
BaseFeeTime: u64Ptr(0), | ||
BVMETHMintUpgradeTime: u64Ptr(0), | ||
MetaTxUpgradeTime: u64Ptr(0), | ||
MetaTxV2UpgradeTime: u64Ptr(0), | ||
MetaTxV3UpgradeTime: nil, | ||
} | ||
) | ||
|
||
type MantleUpgradeChainConfig struct { | ||
ChainID *big.Int `json:"chainId"` // chainId identifies the current chain and is used for replay protection | ||
|
||
BaseFeeTime *uint64 `json:"BaseFeeTime"` // Mantle BaseFee switch time (nil = no fork, 0 = already on mantle baseFee) | ||
BVMETHMintUpgradeTime *uint64 `json:"BVMETHMintUpgradeTime"` // BVM_ETH mint upgrade switch time (nil = no fork, 0 = already on) | ||
MetaTxUpgradeTime *uint64 `json:"metaTxUpgradeTime"` // MetaTxUpgradeBlock identifies the current block height is using metaTx with MetaTxSignDataV2 | ||
BaseFeeTime *uint64 `json:"baseFeeTime"` // Mantle BaseFee switch time (nil = no fork, 0 = already on mantle baseFee) | ||
BVMETHMintUpgradeTime *uint64 `json:"bvmETHMintUpgradeTime"` // BVM_ETH mint upgrade switch time (nil = no fork, 0 = already on) | ||
MetaTxV2UpgradeTime *uint64 `json:"metaTxV2UpgradeTime"` // MetaTxV1UpgradeBlock identifies the current block height is using metaTx with MetaTxSignDataV2 | ||
MetaTxV3UpgradeTime *uint64 `json:"metaTxV3UpgradeTime"` // MetaTxV3UpgradeBlock identifies the current block height is ensuring sponsor and sender are not the same | ||
} | ||
|
||
func GetUpgradeConfigForMantle(chainID *big.Int) *MantleUpgradeChainConfig { | ||
|
@@ -50,6 +69,10 @@ func GetUpgradeConfigForMantle(chainID *big.Int) *MantleUpgradeChainConfig { | |
return &MantleMainnetUpgradeConfig | ||
case params.MantleSepoliaChainId.Int64(): | ||
return &MantleSepoliaUpgradeConfig | ||
case params.MantleSepoliaQA3ChainId.Int64(): | ||
return &MantleSepoliaQA3UpgradeConfig | ||
case params.MantleSepoliaQA9ChainId.Int64(): | ||
return &MantleSepoliaQA9UpgradeConfig | ||
case params.MantleLocalChainId.Int64(): | ||
return &MantleLocalUpgradeConfig | ||
default: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this timestamp suitable for QA3 network?
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.
yes, the upgrade of QA3 has been completed