|
4 | 4 | from future.builtins import next, bytes |
5 | 5 | import copy |
6 | 6 |
|
7 | | -DEFAULT_FORK = "byzantium" |
| 7 | +DEFAULT_FORK = "petersburg" |
8 | 8 |
|
9 | 9 | """ |
10 | 10 | Example use:: |
@@ -474,7 +474,6 @@ def disassemble_all(bytecode, pc=0, fork=DEFAULT_FORK): |
474 | 474 |
|
475 | 475 |
|
476 | 476 | """ |
477 | | - |
478 | 477 | if isinstance(bytecode, bytes): |
479 | 478 | bytecode = bytearray(bytecode) |
480 | 479 | if isinstance(bytecode, str): |
@@ -866,14 +865,15 @@ def __repr__(self): |
866 | 865 |
|
867 | 866 | serenity_instruction_table = InstructionTable({}, previous_fork=constantinople_instruction_table) |
868 | 867 |
|
869 | | -accepted_forks = ("frontier", "homestead", "tangerine_whistle", "spurious_dragon", "byzantium", "constantinople", "serenity") |
| 868 | +accepted_forks = ("frontier", "homestead", "tangerine_whistle", "spurious_dragon", "byzantium", "constantinople", "petersburg", "serenity") |
870 | 869 | instruction_tables = { |
871 | 870 | 'frontier': frontier_instruction_table, |
872 | 871 | 'homestead': homestead_instruction_table, |
873 | 872 | 'tangerine_whistle': tangerine_whistle_instruction_table, |
874 | 873 | 'spurious_dragon': spurious_dragon_instruction_table, |
875 | 874 | 'byzantium': byzantium_instruction_table, |
876 | 875 | 'constantinople': constantinople_instruction_table, |
| 876 | +'petersburg': constantinople_instruction_table, |
877 | 877 | 'serenity': serenity_instruction_table, |
878 | 878 | } |
879 | 879 |
|
@@ -902,10 +902,11 @@ def block_to_fork(block_number): |
902 | 902 | 0: "frontier", |
903 | 903 | 1150000: "homestead", |
904 | 904 | # 1920000 Dao |
905 | | - 2463000: "tangerine_whistle", |
| 905 | + 2463000: "tangerine_whistle", |
906 | 906 | 2675000: "spurious_dragon", |
907 | 907 | 4370000: "byzantium", |
908 | | - 7080000: "constantinople", |
| 908 | + #7280000: "constantinople", # Same Block as petersburg, commented to avoid conflicts |
| 909 | + 7280000: "petersburg", |
909 | 910 | 9999999: "serenity" # to be replaced after Serenity launch |
910 | 911 | } |
911 | 912 | fork_names = list(forks_by_block.values()) |
|
0 commit comments