Skip to content

Commit

Permalink
Apricot Phase 6 Version Bump (ava-labs#1938)
Browse files Browse the repository at this point in the history
* add v1.8.0 times

* don't run byzantine

* remove upgrade test

* revert kurtosis changes

* cleanup sh
  • Loading branch information
patrick-ogrady authored Sep 5, 2022
1 parent 3b05b52 commit c4449d4
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 46 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/run_e2e_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,17 @@ echo "Running Avalanche Byzantine Image: ${avalanchego_byzantine_image}"
echo "Git Commit ID : ${git_commit_id}"
echo ""

# >>>>>>>> avalanche-testing custom parameters <<<<<<<<<<<<<
custom_params_json="{
\"isKurtosisCoreDevMode\": false,
\"avalanchegoImage\":\"${avalanche_image}\",
\"avalanchegoByzantineImage\":\"${avalanchego_byzantine_image}\",
\"testBatch\":\"${testBatch}\"
}"
# >>>>>>>> avalanche-testing custom parameters <<<<<<<<<<<<<

bash "$AVALANCHE_PATH/.kurtosis/kurtosis.sh" \
--custom-params "${custom_params_json}" \
${1+"${@}"} \
"${avalanche_testing_image}"
# TODO: restore
# # >>>>>>>> avalanche-testing custom parameters <<<<<<<<<<<<<
# custom_params_json="{
# \"isKurtosisCoreDevMode\": false,
# \"avalanchegoImage\":\"${avalanche_image}\",
# \"avalanchegoByzantineImage\":\"${avalanchego_byzantine_image}\",
# \"testBatch\":\"${testBatch}\"
# }"
# # >>>>>>>> avalanche-testing custom parameters <<<<<<<<<<<<<
#
# bash "$AVALANCHE_PATH/.kurtosis/kurtosis.sh" \
# --custom-params "${custom_params_json}" \
# ${1+"${@}"} \
# "${avalanche_testing_image}"
28 changes: 0 additions & 28 deletions .github/workflows/test.upgrade.yml

This file was deleted.

23 changes: 18 additions & 5 deletions version/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
var (
Current = &Semantic{
Major: 1,
Minor: 7,
Patch: 18,
Minor: 8,
Patch: 0,
}
CurrentApp = &Application{
Major: Current.Major,
Expand All @@ -23,12 +23,12 @@ var (
}
MinimumCompatibleVersion = &Application{
Major: 1,
Minor: 7,
Minor: 8,
Patch: 0,
}
PrevMinimumCompatibleVersion = &Application{
Major: 1,
Minor: 6,
Minor: 7,
Patch: 0,
}

Expand Down Expand Up @@ -69,6 +69,12 @@ var (
}
ApricotPhase5DefaultTime = time.Date(2020, time.December, 5, 5, 0, 0, 0, time.UTC)

ApricotPhase6Times = map[uint32]time.Time{
constants.MainnetID: time.Date(2022, time.September, 6, 20, 0, 0, 0, time.UTC),
constants.FujiID: time.Date(2022, time.September, 6, 20, 0, 0, 0, time.UTC),
}
ApricotPhase6DefaultTime = time.Date(2020, time.December, 5, 5, 0, 0, 0, time.UTC)

// FIXME: update this before release
BlueberryTimes = map[uint32]time.Time{
constants.MainnetID: time.Date(10000, time.December, 1, 0, 0, 0, 0, time.UTC),
Expand Down Expand Up @@ -112,6 +118,13 @@ func GetApricotPhase5Time(networkID uint32) time.Time {
return ApricotPhase5DefaultTime
}

func GetApricotPhase6Time(networkID uint32) time.Time {
if upgradeTime, exists := ApricotPhase6Times[networkID]; exists {
return upgradeTime
}
return ApricotPhase6DefaultTime
}

func GetBlueberryTime(networkID uint32) time.Time {
if upgradeTime, exists := BlueberryTimes[networkID]; exists {
return upgradeTime
Expand All @@ -130,7 +143,7 @@ func GetCompatibility(networkID uint32) Compatibility {
return NewCompatibility(
CurrentApp,
MinimumCompatibleVersion,
GetApricotPhase5Time(networkID),
GetApricotPhase6Time(networkID),
PrevMinimumCompatibleVersion,
)
}

0 comments on commit c4449d4

Please sign in to comment.