Forks: Use a common fork list outside the EVMs

Many places outside the EVM use `Fork` and the fork list, and in general we
want progressively fewer dependencies on EVM internal types and files.

This may prove to be a temporary location, especially when we implement
issue #640.  But it's a fine temporary location if so.

Signed-off-by: Jamie Lokier <jamie@shareable.org>
This commit is contained in:
Jamie Lokier 2021-06-01 11:02:50 +01:00
parent b3a788c7ce
commit 05bc174bef
No known key found for this signature in database
GPG Key ID: CBC25C68435C30A2
3 changed files with 23 additions and 49 deletions

19
nimbus/forks.nim Normal file
View File

@ -0,0 +1,19 @@
# Nimbus - Enumerate Eth1 forks
#
# Copyright (c) 2018 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
# at your option. This file may not be copied, modified, or distributed except according to those terms.
type
Fork* = enum
FkFrontier = "frontier"
FkHomestead = "homestead"
FkTangerine = "tangerine whistle"
FkSpurious = "spurious dragon"
FkByzantium = "byzantium"
FkConstantinople = "constantinople"
FkPetersburg = "petersburg"
FkIstanbul = "istanbul"
FkBerlin = "berlin"

View File

@ -1,20 +1,2 @@
# Nimbus
# Copyright (c) 2018 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import stint, eth/common/eth_types
type
Fork* = enum
FkFrontier = "frontier"
FkHomestead = "homestead"
FkTangerine = "tangerine whistle"
FkSpurious = "spurious dragon"
FkByzantium = "byzantium"
FkConstantinople = "constantinople"
FkPetersburg = "petersburg"
FkIstanbul = "istanbul"
FkBerlin = "berlin"
import ../../forks
export Fork

View File

@ -1,29 +1,2 @@
# Nimbus
# Copyright (c) 2018 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
# http://www.apache.org/licenses/LICENSE-2.0)
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
# http://opensource.org/licenses/MIT)
# at your option. This file may not be copied, modified, or distributed except
# according to those terms.
## List of known Ethereum forks
## ============================
##
## See `here <../../ex/vm/interpreter/forks_list.html>`_ for an
## overview.
type
Fork* = enum
FkFrontier = "frontier"
FkHomestead = "homestead"
FkTangerine = "tangerine whistle"
FkSpurious = "spurious dragon"
FkByzantium = "byzantium"
FkConstantinople = "constantinople"
FkPetersburg = "petersburg"
FkIstanbul = "istanbul"
FkBerlin = "berlin"
# End
import ../../forks
export Fork