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

Update genesis factory to support constantinople #61

Merged
merged 2 commits into from
Aug 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions evmlab/genesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def __init__(self):
"homesteadBlock": 0,
"daoForkBlock": 0,
"byzantiumBlock" : 2000,
"constantinopleBlock" : 2000,
}

def geth(self):
Expand Down Expand Up @@ -71,11 +72,7 @@ def parity(self):
"blockReward": "0x4563918244F40000",
"registrar": "",
"frontierCompatibilityModeLimit": "0x0",
"eip150Transition" : 0,
"eip155Transition" : 0,
"eip160Transition" : 0,
"eip161abcTransition": 0,
"eip161dTransition" : 0,
"eip649Reward":"0x29A2241AF62C0000",
"eip649Transition" : self.config['byzantiumBlock'],
"eip100bTransition": self.config['byzantiumBlock'],
Expand Down Expand Up @@ -105,12 +102,18 @@ def parity(self):
"minGasLimit": "0x1388",
"networkID" : "0x0",
"eip98Transition": "0x0",
"eip86Transition": "0x0",
"eip86Transition": self.config['constantinopleBlock'],
"eip140Transition" : self.config['byzantiumBlock'],
"eip150Transition" : 0,
"eip160Transition" : 0,
"eip161abcTransition": 0,
"eip161dTransition" : 0,
"eip211Transition" : self.config['byzantiumBlock'],
"eip214Transition" : self.config['byzantiumBlock'],
"eip658Transition" : self.config['byzantiumBlock'],

"eip145Transition" : self.config['constantinopleBlock'],
"eip1052Transition" : self.config['constantinopleBlock'],
"eip1283Transition" : self.config['constantinopleBlock'],

# Also new pre
},
Expand All @@ -137,32 +140,29 @@ def setBlockNumber(self, blockNumber):
self.blockNumber = int(blockNumber, 16)

def setConfigHomestead(self):
self.config['constantinopleBlock'] = 2000
self.config['byzantiumBlock'] = 2000
self.config['eip158Block'] = 2000
self.config['eip155Block'] = 2000
self.config['eip150Block'] = 2000
self.config['homesteadBlock'] = 0

def setConfigTangerineWhistle(self):
self.config['byzantiumBlock'] = 2000
self.config['eip158Block'] = 2000
self.config['eip155Block'] = 2000
self.setConfigHomestead()
self.config['eip150Block'] = 0
self.config['homesteadBlock'] = 0

def setConfigSpuriousDragon(self):
self.config['byzantiumBlock'] = 2000
self.setConfigTangerineWhistle()
self.config['eip158Block'] = 0
self.config['eip155Block'] = 0
self.config['eip150Block'] = 0
self.config['homesteadBlock'] = 0

def setConfigMetropolis(self):
self.setConfigSpuriousDragon()
self.config['byzantiumBlock'] = 0
self.config['eip158Block'] = 0
self.config['eip155Block'] = 0
self.config['eip150Block'] = 0
self.config['homesteadBlock'] = 0

def setConfigConstantinople(self):
self.setConfigMetropolis()
self.config['constantinopleBlock'] = 0

def addPrestateAccount(self, account):
self.alloc[account['address'].lower()] = {
Expand Down