Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit 2921674

Browse files
author
Marko Boben
committed
Updated submitter fork addresses
1 parent fbe750d commit 2921674

File tree

3 files changed

+20
-21
lines changed

3 files changed

+20
-21
lines changed

avalanchego/coreth/core/keeper.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@ import (
1717

1818
var (
1919
// Define activation times for submitter contract
20-
submitterContractActivationTimeSongbird = big.NewInt(time.Date(2024, time.March, 1, 12, 0, 0, 0, time.UTC).Unix())
21-
submitterContractActivationTimeCoston = big.NewInt(time.Date(2024, time.January, 31, 12, 0, 0, 0, time.UTC).Unix())
20+
submitterContractActivationTimeSongbird = big.NewInt(time.Date(2024, time.March, 15, 12, 0, 0, 0, time.UTC).Unix())
21+
submitterContractActivationTimeCoston = big.NewInt(time.Date(2024, time.February, 22, 14, 0, 0, 0, time.UTC).Unix())
2222

2323
// Define ftso and submitter contract addresses
2424
prioritisedFTSOContractAddress = common.HexToAddress("0x1000000000000000000000000000000000000003")
2525

26-
prioritisedSubmitterContractAddressSongbird = common.HexToAddress("0x200000000000000000000000000000000000000a")
27-
prioritisedSubmitterContractAddressCoston = common.HexToAddress("0x300000000000000000000000000000000000000b")
26+
prioritisedSubmitterContractAddress = common.HexToAddress("0x2cA6571Daa15ce734Bbd0Bf27D5C9D16787fc33f")
2827
)
2928

3029
// Define errors
@@ -88,10 +87,10 @@ func isPrioritisedSubmitterContract(chainID *big.Int, to *common.Address, blockT
8887
case to == nil || chainID == nil || blockTime == nil:
8988
return false
9089
case chainID.Cmp(params.SongbirdChainID) == 0:
91-
return *to == prioritisedSubmitterContractAddressSongbird &&
90+
return *to == prioritisedSubmitterContractAddress &&
9291
blockTime.Cmp(submitterContractActivationTimeSongbird) > 0
9392
case chainID.Cmp(params.CostonChainID) == 0:
94-
return *to == prioritisedSubmitterContractAddressCoston &&
93+
return *to == prioritisedSubmitterContractAddress &&
9594
blockTime.Cmp(submitterContractActivationTimeCoston) > 0
9695
default:
9796
return false

avalanchego/coreth/core/keeper_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,8 @@ func TestKeeperTriggerShouldNotMintMoreThanLimit(t *testing.T) {
454454

455455
func TestPrioritisedContract(t *testing.T) {
456456
address := common.HexToAddress("0x123456789aBCdEF123456789aBCdef123456789A")
457-
preForkTime := big.NewInt(time.Date(2024, time.February, 1, 12, 0, 0, 0, time.UTC).Unix())
458-
postForkTime := big.NewInt(time.Date(2024, time.March, 2, 12, 0, 0, 0, time.UTC).Unix())
457+
preForkTime := big.NewInt(time.Date(2024, time.March, 13, 12, 0, 0, 0, time.UTC).Unix())
458+
postForkTime := big.NewInt(time.Date(2024, time.March, 16, 12, 0, 0, 0, time.UTC).Unix())
459459
ret0 := [32]byte{}
460460
ret1 := [32]byte{}
461461
ret1[31] = 1
@@ -466,16 +466,16 @@ func TestPrioritisedContract(t *testing.T) {
466466
if !IsPrioritisedContractCall(params.SongbirdChainID, &prioritisedFTSOContractAddress, nil, preForkTime) {
467467
t.Errorf("Expected true for FTSO contract")
468468
}
469-
if IsPrioritisedContractCall(params.SongbirdChainID, &prioritisedSubmitterContractAddressSongbird, ret1[:], preForkTime) {
469+
if IsPrioritisedContractCall(params.SongbirdChainID, &prioritisedSubmitterContractAddress, ret1[:], preForkTime) {
470470
t.Errorf("Expected false for submitter contract before activation")
471471
}
472-
if !IsPrioritisedContractCall(params.SongbirdChainID, &prioritisedSubmitterContractAddressSongbird, ret1[:], postForkTime) {
472+
if !IsPrioritisedContractCall(params.SongbirdChainID, &prioritisedSubmitterContractAddress, ret1[:], postForkTime) {
473473
t.Errorf("Expected true for submitter contract after activation")
474474
}
475-
if IsPrioritisedContractCall(params.SongbirdChainID, &prioritisedSubmitterContractAddressSongbird, ret0[:], postForkTime) {
475+
if IsPrioritisedContractCall(params.SongbirdChainID, &prioritisedSubmitterContractAddress, ret0[:], postForkTime) {
476476
t.Errorf("Expected false for submitter contract with wrong return value")
477477
}
478-
if IsPrioritisedContractCall(params.SongbirdChainID, &prioritisedSubmitterContractAddressSongbird, nil, postForkTime) {
478+
if IsPrioritisedContractCall(params.SongbirdChainID, &prioritisedSubmitterContractAddress, nil, postForkTime) {
479479
t.Errorf("Expected false for submitter contract with no return value")
480480
}
481481
}

avalanchego/coreth/core/state_connector.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,15 @@ func GetDefaultAttestors(chainID *big.Int, blockTime *big.Int) []common.Address
122122
switch {
123123
case blockTime.Cmp(submitterContractActivationTimeSongbird) > 0:
124124
return []common.Address{
125-
common.HexToAddress("0x2D3e7e4b19bDc920fd9C57BD3072A31F5a59FeC8"),
126-
common.HexToAddress("0x442DD539Fe78D43A1a9358FF3460CfE63e2bC9CC"),
127-
common.HexToAddress("0x49893c5Dfc035F4eE4E46faC014f6D4bC80F7f92"),
128-
common.HexToAddress("0x5D2f75392DdDa69a2818021dd6a64937904c8352"),
129-
common.HexToAddress("0x6455dC38fdF739b6fE021b30C7D9672C1c6DEb5c"),
130-
common.HexToAddress("0x808441Ec3Fa1721330226E69527Bc160D8d9386a"),
131-
common.HexToAddress("0x823B0f5c7758E9d3bE55bA1EA840E29ccd5D5CcB"),
132-
common.HexToAddress("0x85016969b9eBDB8977975a4743c9FCEeabCEAf8A"),
133-
common.HexToAddress("0x8A3D627D86A81F5D21683F4963565C63DB5e1309"),
125+
common.HexToAddress("0xcE397b9a395ace2e328030699bDDf4E2F049A05B"),
126+
common.HexToAddress("0xeDBb013BBC314124a9f842c1887e34cfeB03B052"),
127+
common.HexToAddress("0xb9eF3951ac2D04C6bdD886bF042041E3954E86aF"),
128+
common.HexToAddress("0x816Cec8f3A37Fd673Cfd4229441c59cA8DbD0641"),
129+
common.HexToAddress("0x14c9c4583F0b1af8a69452Ec1b29884240f83bDC"),
130+
common.HexToAddress("0x0049081C2D6def64800cC011Bd9aDe8682c6593a"),
131+
common.HexToAddress("0x53Fcb50a22aFd6e5438d754CB22c4726032d2488"),
132+
common.HexToAddress("0x35f4F0Bb73a6040F24927e1735B089d7769F7674"),
133+
common.HexToAddress("0x3B583C919fD4C863F3A17d11929346C687FfB7c3"),
134134
}
135135
case blockTime.Cmp(songbirdOct22ForkTime) > 0:
136136
return []common.Address{

0 commit comments

Comments
 (0)