-
Notifications
You must be signed in to change notification settings - Fork 75
[ETCM-1015] Add Magneto block height to configs #1067
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e1d550f
[ETCM-1015] Add ECIP-1103 block number to configs
lukasz-golebiewski f4ee222
[ETCM-1015] Add ecip1103 to ForkBlockNumbers
lukasz-golebiewski 0cf0484
[ETCM-1015] Init empty ForkBlockNumbers
lukasz-golebiewski dfffdad
[ETCM-1015] Update the ForkIdSpec
lukasz-golebiewski 3232cf2
[ETCM-1015] Format all
lukasz-golebiewski 9311dcb
[ETCM-1015] Rename magneto fork
lukasz-golebiewski 8b8ee34
Merge branch 'develop' into feature/etcm-1015
lukasz-golebiewski 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -224,28 +224,12 @@ class BlockGeneratorSpec extends AnyFlatSpec with Matchers with ScalaCheckProper | |
gasTieBreaker = false, | ||
ethCompatibleStorage = true, | ||
treasuryAddress = Address(0), | ||
forkBlockNumbers = ForkBlockNumbers( | ||
forkBlockNumbers = ForkBlockNumbers.Empty.copy( | ||
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. 👍 |
||
frontierBlockNumber = 0, | ||
homesteadBlockNumber = 1150000, | ||
difficultyBombPauseBlockNumber = 3000000, | ||
difficultyBombContinueBlockNumber = 5000000, | ||
difficultyBombRemovalBlockNumber = 5900000, | ||
eip155BlockNumber = Long.MaxValue, | ||
eip106BlockNumber = Long.MaxValue, | ||
byzantiumBlockNumber = Long.MaxValue, | ||
constantinopleBlockNumber = Long.MaxValue, | ||
istanbulBlockNumber = Long.MaxValue, | ||
eip160BlockNumber = Long.MaxValue, | ||
eip150BlockNumber = Long.MaxValue, | ||
eip161BlockNumber = Long.MaxValue, | ||
atlantisBlockNumber = Long.MaxValue, | ||
aghartaBlockNumber = Long.MaxValue, | ||
phoenixBlockNumber = Long.MaxValue, | ||
petersburgBlockNumber = Long.MaxValue, | ||
ecip1098BlockNumber = Long.MaxValue, | ||
ecip1097BlockNumber = Long.MaxValue, | ||
ecip1099BlockNumber = Long.MaxValue, | ||
ecip1049BlockNumber = None | ||
difficultyBombRemovalBlockNumber = 5900000 | ||
) | ||
) | ||
|
||
|
@@ -292,28 +276,13 @@ class BlockGeneratorSpec extends AnyFlatSpec with Matchers with ScalaCheckProper | |
|
||
it should "generate correct block with (without empty accounts) after EIP-161" in new TestSetup { | ||
implicit override lazy val blockchainConfig = BlockchainConfig( | ||
forkBlockNumbers = ForkBlockNumbers( | ||
forkBlockNumbers = ForkBlockNumbers.Empty.copy( | ||
frontierBlockNumber = 0, | ||
homesteadBlockNumber = 1150000, | ||
eip155BlockNumber = Long.MaxValue, | ||
eip106BlockNumber = Long.MaxValue, | ||
difficultyBombPauseBlockNumber = 3000000, | ||
difficultyBombContinueBlockNumber = 5000000, | ||
difficultyBombRemovalBlockNumber = 5900000, | ||
byzantiumBlockNumber = Long.MaxValue, | ||
constantinopleBlockNumber = Long.MaxValue, | ||
istanbulBlockNumber = Long.MaxValue, | ||
eip160BlockNumber = Long.MaxValue, | ||
eip150BlockNumber = Long.MaxValue, | ||
eip161BlockNumber = 0, | ||
atlantisBlockNumber = Long.MaxValue, | ||
aghartaBlockNumber = Long.MaxValue, | ||
phoenixBlockNumber = Long.MaxValue, | ||
petersburgBlockNumber = Long.MaxValue, | ||
ecip1098BlockNumber = Long.MaxValue, | ||
ecip1097BlockNumber = Long.MaxValue, | ||
ecip1099BlockNumber = Long.MaxValue, | ||
ecip1049BlockNumber = None | ||
eip161BlockNumber = 0 | ||
), | ||
chainId = 0x3d.toByte, | ||
networkId = 1, | ||
|
@@ -674,28 +643,12 @@ class BlockGeneratorSpec extends AnyFlatSpec with Matchers with ScalaCheckProper | |
SignedTransactionWithSender(signedTransaction, Address(keyPair)) | ||
|
||
val baseBlockchainConfig: BlockchainConfig = BlockchainConfig( | ||
forkBlockNumbers = ForkBlockNumbers( | ||
frontierBlockNumber = 0, | ||
forkBlockNumbers = ForkBlockNumbers.Empty.copy( | ||
homesteadBlockNumber = 1150000, | ||
eip155BlockNumber = 0, | ||
eip106BlockNumber = Long.MaxValue, | ||
byzantiumBlockNumber = Long.MaxValue, | ||
difficultyBombPauseBlockNumber = 3000000, | ||
difficultyBombContinueBlockNumber = 5000000, | ||
difficultyBombRemovalBlockNumber = 5900000, | ||
constantinopleBlockNumber = Long.MaxValue, | ||
istanbulBlockNumber = Long.MaxValue, | ||
eip160BlockNumber = Long.MaxValue, | ||
eip150BlockNumber = Long.MaxValue, | ||
eip161BlockNumber = Long.MaxValue, | ||
atlantisBlockNumber = Long.MaxValue, | ||
aghartaBlockNumber = Long.MaxValue, | ||
phoenixBlockNumber = Long.MaxValue, | ||
petersburgBlockNumber = Long.MaxValue, | ||
ecip1098BlockNumber = Long.MaxValue, | ||
ecip1097BlockNumber = Long.MaxValue, | ||
ecip1099BlockNumber = Long.MaxValue, | ||
ecip1049BlockNumber = None | ||
difficultyBombRemovalBlockNumber = 5900000 | ||
), | ||
chainId = 0x3d.toByte, | ||
networkId = 1, | ||
|
This file contains hidden or 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 hidden or 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.
Instead of using a super high block number, why not define this config value as
Option[BigInt]
, and omit it in the files where it does not make sense?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.
I was thinking about doing it like this, but in the end didn't to remain consistent. Perhaps it would make sense to refactor those configs with the approach above in a separate PR?
Uh oh!
There was an error while loading. Please reload this page.
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.
There is a configuration added by me, that is an
Option
already :) So total consistency is already gone 😅I would love to see this refactored