Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
0fa8b47
name H upgrade
JonathanOppenheimer Nov 6, 2025
86f079c
Keep latest as Granite
JonathanOppenheimer Nov 6, 2025
efe2db4
Complete Helicon setup changes
JonathanOppenheimer Nov 7, 2025
790bd2e
Add consistency tests
JonathanOppenheimer Nov 7, 2025
2779f9c
lint
JonathanOppenheimer Nov 7, 2025
c7ff125
Update upgrade/upgrade.go
JonathanOppenheimer Nov 11, 2025
25b6b00
Merge branch 'master' into JonathanOppenheimer/helicon-upgrade
JonathanOppenheimer Nov 11, 2025
84da32a
remove Helicon epoch duration
JonathanOppenheimer Nov 12, 2025
e089d73
don't override old granite epoch duration
JonathanOppenheimer Nov 12, 2025
daa3e84
Use latest flag
JonathanOppenheimer Nov 13, 2025
473bd7b
add checklist
JonathanOppenheimer Nov 13, 2025
c7f2f2d
lint
JonathanOppenheimer Nov 13, 2025
0882d14
lowercase
JonathanOppenheimer Nov 13, 2025
04518ba
Delete upgrade/NEW_UPGRADE_CHECKLIST.md
JonathanOppenheimer Nov 13, 2025
f4eaec0
vastly simplify the checklist
JonathanOppenheimer Nov 13, 2025
6bdc1f9
Maru initial changes
JonathanOppenheimer Nov 13, 2025
3c1db5d
fix tests
JonathanOppenheimer Nov 13, 2025
2fa1a6b
put granite epoch back
JonathanOppenheimer Nov 13, 2025
f221f0f
lint
JonathanOppenheimer Nov 13, 2025
161b7ae
map configs
JonathanOppenheimer Nov 13, 2025
0048394
simplify tests for Maru
JonathanOppenheimer Nov 13, 2025
8a48475
Move time ordering test to upgrade_test.go
JonathanOppenheimer Nov 13, 2025
f321ffa
fix upgrade time copy and paste
JonathanOppenheimer Nov 13, 2025
604b396
use SetTimeOnly
JonathanOppenheimer Nov 13, 2025
af303f2
use existing helper
StephenButtolph Nov 13, 2025
55f0dac
No need to update latest anymore
StephenButtolph Nov 13, 2025
63c6f1d
Apply suggestion from @StephenButtolph
StephenButtolph Nov 13, 2025
c4f2701
remove uneeded code
JonathanOppenheimer Nov 13, 2025
a27d198
Update upgrade/new_upgrade_checklist.md
JonathanOppenheimer Nov 13, 2025
2331491
Update upgrade/new_upgrade_checklist.md
JonathanOppenheimer Nov 13, 2025
a1e4b61
add documentation for rpcchain
JonathanOppenheimer Nov 13, 2025
8b5497c
get rid of last reflect test
JonathanOppenheimer Nov 13, 2025
9b161eb
Merge branch 'master' into JonathanOppenheimer/helicon-upgrade
JonathanOppenheimer Nov 13, 2025
d6d06e0
Apply suggestions from code review
JonathanOppenheimer Nov 14, 2025
3980618
Apply suggestions from code review
JonathanOppenheimer Nov 14, 2025
497730c
Add grpc test
JonathanOppenheimer Nov 14, 2025
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
9 changes: 9 additions & 0 deletions upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ var (
FortunaTime: time.Date(2025, time.April, 8, 15, 0, 0, 0, time.UTC),
GraniteTime: time.Date(2025, time.November, 19, 16, 0, 0, 0, time.UTC),
GraniteEpochDuration: 5 * time.Minute,
HeliconTime: UnscheduledActivationTime,
}
Fuji = Config{
ApricotPhase1Time: time.Date(2021, time.March, 26, 14, 0, 0, 0, time.UTC),
Expand All @@ -61,6 +62,7 @@ var (
FortunaTime: time.Date(2025, time.March, 13, 15, 0, 0, 0, time.UTC),
GraniteTime: time.Date(2025, time.October, 29, 15, 0, 0, 0, time.UTC),
GraniteEpochDuration: 5 * time.Minute,
HeliconTime: UnscheduledActivationTime,
}
Default = Config{
ApricotPhase1Time: InitiallyActiveTime,
Expand All @@ -80,6 +82,7 @@ var (
FortunaTime: InitiallyActiveTime,
GraniteTime: InitiallyActiveTime,
GraniteEpochDuration: 30 * time.Second,
HeliconTime: InitiallyActiveTime,
}

ErrInvalidUpgradeTimes = errors.New("invalid upgrade configuration")
Expand All @@ -103,6 +106,7 @@ type Config struct {
FortunaTime time.Time `json:"fortunaTime"`
GraniteTime time.Time `json:"graniteTime"`
GraniteEpochDuration time.Duration `json:"graniteEpochDuration"`
HeliconTime time.Time `json:"heliconTime"`
}

func (c *Config) Validate() error {
Expand All @@ -121,6 +125,7 @@ func (c *Config) Validate() error {
c.EtnaTime,
c.FortunaTime,
c.GraniteTime,
c.HeliconTime,
}
for i := 0; i < len(upgrades)-1; i++ {
if upgrades[i].After(upgrades[i+1]) {
Expand Down Expand Up @@ -192,6 +197,10 @@ func (c *Config) IsGraniteActivated(t time.Time) bool {
return !t.Before(c.GraniteTime)
}

func (c *Config) IsHeliconActivated(t time.Time) bool {
return !t.Before(c.HeliconTime)
}

func GetConfig(networkID uint32) Config {
switch networkID {
case constants.MainnetID:
Expand Down
3 changes: 3 additions & 0 deletions upgrade/upgradetest/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ func GetConfigWithUpgradeTime(fork Fork, upgradeTime time.Time) upgrade.Config {
// to the provided upgradeTime.
func SetTimesTo(c *upgrade.Config, fork Fork, upgradeTime time.Time) {
switch fork {
case Helicon:
c.HeliconTime = upgradeTime
fallthrough
case Granite:
c.GraniteTime = upgradeTime
fallthrough
Expand Down
3 changes: 3 additions & 0 deletions upgrade/upgradetest/fork.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const (
Etna
Fortuna
Granite
Helicon // naming credit to @bernard-avalabs!

Latest = Granite
)
Expand All @@ -28,6 +29,8 @@ type Fork int

func (f Fork) String() string {
switch f {
case Helicon:
return "Helicon"
case Granite:
return "Granite"
case Fortuna:
Expand Down