diff --git a/avalanchego/genesis/config.go b/avalanchego/genesis/config.go index 99231732..12610e2d 100644 --- a/avalanchego/genesis/config.go +++ b/avalanchego/genesis/config.go @@ -124,7 +124,6 @@ func (c Config) Unparse() (UnparsedConfig, error) { } func (c *Config) InitialSupply() (uint64, error) { - // SGB-MERGE // For songbird, coston and local networks, the initial supply is 1 if c.NetworkID == constants.SongbirdID || c.NetworkID == constants.CostonID || c.NetworkID == constants.LocalID { return 1, nil diff --git a/avalanchego/snow/validators/custom.go b/avalanchego/snow/validators/custom.go index 901310ae..01bbb601 100644 --- a/avalanchego/snow/validators/custom.go +++ b/avalanchego/snow/validators/custom.go @@ -1,7 +1,5 @@ package validators -// SGB-MERGE - import ( "errors" "fmt" @@ -151,26 +149,7 @@ func loadSongbirdValidators(timestamp time.Time) []Validator { return nil } nodeIDs := []string{ - "NodeID-3M9KVT6ixi4gVMisbm5TnPXYXgFN5LHuv", - "NodeID-NnX4fajAmyvpL9RLfheNdc47FKKDuQW8i", - "NodeID-AzdF8JNU468uwZYGquHt7bhDrsggZpK67", - "NodeID-FqeGcnLAXbDTthd382aP9uyu1i47paRRh", - "NodeID-B9HuZ5hDkRodyRRsiMEHWgMmmMF7xSKbj", - "NodeID-Jx3E1F7mfkseZmqnFgDUFV3eusMxVdT6Z", - "NodeID-FnvWuwvJGezs4uaBLujkfeM8U3gmAUY3Z", - "NodeID-LhVs6hzHjBcEkzA1Eu8Qxb9nEQAk1Qbgf", - "NodeID-9SqDo3MxpvEDN4bE4rLTyM7HkkKAw4h96", - "NodeID-4tStYRTi3KDxFmv1YHTZAQxbzeyMA7z52", - "NodeID-8XnMh17zo6pB8Pa2zptRBi9TbbMZgij2t", - "NodeID-Cn9P5wgg7d9RNLqm4dFLCUV2diCxpkj7f", - "NodeID-PEDdah7g7Efiii1xw8ex2dH58oMfByzjb", - "NodeID-QCt9AxMPt5nn445CQGoA3yktqkChnKmPY", - "NodeID-9bWz6J61B8WbQtzeSyA1jsXosyVbuUJd1", - "NodeID-DLMnewsEwtSH8Qk7p9RGzUVyZAaZVMKsk", - "NodeID-7meEpyjmGbL577th58dm4nvvtVZiJusFp", - "NodeID-JeYnnrUkuArAAe2Sjo47Z3X5yfeF7cw43", - "NodeID-Fdwp9Wtjh5rxzuTCF9z4zrSM31y7ZzBQS", - "NodeID-JdEBRLS98PansyFKQUzFKqk4xqrVZ41nC", + "NodeID-HaZ4HpanjndqSuN252chFsTysmdND5meA", } return createValidators(nodeIDs, uint64(songbirdValidatorWeight)) } diff --git a/avalanchego/vms/platformvm/state/diff.go b/avalanchego/vms/platformvm/state/diff.go index e557f25c..32d4a0d9 100644 --- a/avalanchego/vms/platformvm/state/diff.go +++ b/avalanchego/vms/platformvm/state/diff.go @@ -28,7 +28,6 @@ type Diff interface { } type diff struct { - // SGB-MERGE networkID uint32 parentID ids.ID diff --git a/avalanchego/vms/platformvm/state/state.go b/avalanchego/vms/platformvm/state/state.go index 4d7ca7b0..efca1c5a 100644 --- a/avalanchego/vms/platformvm/state/state.go +++ b/avalanchego/vms/platformvm/state/state.go @@ -83,7 +83,6 @@ type Chain interface { UTXOGetter UTXODeleter - // SGB-MERGE GetNetworkID() uint32 GetTimestamp() time.Time diff --git a/avalanchego/vms/platformvm/txs/executor/inflation_settings.go b/avalanchego/vms/platformvm/txs/executor/inflation_settings.go index 12d669e1..ad6e2465 100644 --- a/avalanchego/vms/platformvm/txs/executor/inflation_settings.go +++ b/avalanchego/vms/platformvm/txs/executor/inflation_settings.go @@ -184,16 +184,16 @@ func getSongbirdInflationSettings(currentTimestamp time.Time, config *config.Con default: // Phase 2 return InflationSettings{ - MinValidatorStake: 1 * units.MegaAvax, + MinValidatorStake: 10 * units.Avax, MaxValidatorStake: 200 * units.MegaAvax, - MinDelegatorStake: 50 * units.KiloAvax, + MinDelegatorStake: 1 * units.Avax, MinDelegationFee: 0, MinStakeDuration: 60 * 24 * time.Hour, MinDelegateDuration: 2 * 7 * 24 * time.Hour, MaxStakeDuration: 365 * 24 * time.Hour, MinFutureStartTimeOffset: MaxFutureStartTime, MaxValidatorWeightFactor: 15, - MinStakeStartTime: time.Date(2024, time.September, 3, 0, 0, 0, 0, time.UTC), + MinStakeStartTime: time.Date(2024, time.September, 5, 12, 30, 0, 0, time.UTC), } } } diff --git a/avalanchego/vms/platformvm/txs/executor/proposal_tx_executor.go b/avalanchego/vms/platformvm/txs/executor/proposal_tx_executor.go index 5ec294c4..779b2fa8 100644 --- a/avalanchego/vms/platformvm/txs/executor/proposal_tx_executor.go +++ b/avalanchego/vms/platformvm/txs/executor/proposal_tx_executor.go @@ -42,6 +42,10 @@ var ( errAdvanceTimeTxIssuedAfterBanff = errors.New("AdvanceTimeTx issued after Banff") ) +var ( + songbirdLatestStakingTime = time.Date(2024, time.December, 31, 0, 0, 0, 0, time.UTC) +) + type ProposalTxExecutor struct { // inputs, to be filled before visitor methods are called *Backend @@ -572,6 +576,9 @@ func GetNextStakerChangeTime(state state.Chain) (time.Time, error) { case hasPendingStaker: return pendingStakerIterator.Value().NextTime, nil default: + if state.GetNetworkID() == constants.SongbirdID || state.GetNetworkID() == constants.CostonID || state.GetNetworkID() == constants.LocalID { + return songbirdLatestStakingTime, nil + } return time.Time{}, database.ErrNotFound } } diff --git a/avalanchego/vms/platformvm/vm.go b/avalanchego/vms/platformvm/vm.go index 37f3159c..ab08824d 100644 --- a/avalanchego/vms/platformvm/vm.go +++ b/avalanchego/vms/platformvm/vm.go @@ -570,7 +570,7 @@ func (vm *VM) updateValidators() error { return err } - // SGB-MERGE: This are new lines of code + // Songbird (coston, local) had a fixed set of validators at genesis for _, v := range validators.DefaultValidatorList() { err := primaryValidators.AddWeight(v.ID(), v.Weight()) if err != nil { diff --git a/coreth/params/config.go b/coreth/params/config.go index 52f4aede..274a575a 100644 --- a/coreth/params/config.go +++ b/coreth/params/config.go @@ -314,11 +314,11 @@ var ( ApricotPhase3BlockTimestamp: big.NewInt(time.Date(2022, time.March, 7, 14, 0, 0, 0, time.UTC).Unix()), ApricotPhase4BlockTimestamp: big.NewInt(time.Date(2022, time.March, 7, 15, 0, 0, 0, time.UTC).Unix()), ApricotPhase5BlockTimestamp: big.NewInt(time.Date(2022, time.March, 7, 16, 0, 0, 0, time.UTC).Unix()), - ApricotPhasePre6BlockTimestamp: big.NewInt(time.Date(10000, time.January, 1, 0, 0, 0, 0, time.UTC).Unix()), - ApricotPhase6BlockTimestamp: big.NewInt(time.Date(10000, time.January, 1, 0, 0, 0, 0, time.UTC).Unix()), - ApricotPhasePost6BlockTimestamp: big.NewInt(time.Date(10000, time.January, 1, 0, 0, 0, 0, time.UTC).Unix()), - SongbirdTransitionTimestamp: big.NewInt(time.Date(2024, time.August, 20, 12, 0, 0, 0, time.UTC).Unix()), - BanffBlockTimestamp: big.NewInt(time.Date(10000, time.January, 1, 0, 0, 0, 0, time.UTC).Unix()), + ApricotPhasePre6BlockTimestamp: big.NewInt(time.Date(2024, time.September, 17, 16, 20, 0, 0, time.UTC).Unix()), + ApricotPhase6BlockTimestamp: big.NewInt(time.Date(2024, time.September, 17, 16, 30, 0, 0, time.UTC).Unix()), + ApricotPhasePost6BlockTimestamp: big.NewInt(time.Date(2024, time.September, 17, 16, 40, 0, 0, time.UTC).Unix()), + SongbirdTransitionTimestamp: big.NewInt(time.Date(2024, time.September, 5, 12, 0, 0, 0, time.UTC).Unix()), + BanffBlockTimestamp: big.NewInt(time.Date(2024, time.September, 17, 16, 50, 0, 0, time.UTC).Unix()), } TestChainConfig = &ChainConfig{big.NewInt(1), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0)} @@ -428,7 +428,6 @@ func (c *ChainConfig) String() string { return banner } -// SGB-MERGE // Code for songbird network (songbird, coston, local id) func (c *ChainConfig) IsSongbirdCode() bool { return c.ChainID != nil && (c.ChainID.Cmp(SongbirdChainID) == 0 || c.ChainID.Cmp(CostonChainID) == 0 || c.ChainID.Cmp(LocalChainID) == 0) @@ -792,7 +791,6 @@ type Rules struct { IsCortina bool IsClementine bool - // SGB-MERGE // Songbird (coston, local) IsSongbirdCode bool IsSongbirdTransition bool