This issue is to track the behaviour of
|
// version get the version for the chain instance |
|
// |
|
// TODO: This is not foolproof and does not cover all scenarios. |
|
func Version(hardForkName string, ValidiumMode bool) (uint8, error) { |
|
|
|
var domain, stfVersion uint8 |
|
|
|
if ValidiumMode { |
|
domain = 1 |
|
stfVersion = 1 |
|
} else { |
|
domain = 0 |
|
switch canonicalName := strings.ToLower(hardForkName); canonicalName { |
|
case "euclidv1": |
|
stfVersion = 6 |
|
case "euclidv2": |
|
stfVersion = 7 |
|
case "feynman": |
|
stfVersion = 8 |
|
default: |
|
return 0, errors.New("unknown fork name " + canonicalName) |
|
} |
|
} |
|
|
|
return (domain << DomainOffset) + stfVersion, nil |
|
} |
post merging #1737
This issue is to track the behaviour of
scroll/coordinator/internal/utils/version.go
Lines 13 to 38 in 9c8782f
post merging #1737
func Versionitselfif ValidiumModeblock is insufficient