Skip to content

Commit

Permalink
[Version] 0.4.11 - SP1 active at 2023-07-03 9UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
peak3d committed Jul 3, 2023
1 parent 9153ec2 commit fee8858
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions version/compatibility.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"24": [
"v0.4.11",
"v0.4.10"
],
"20": [
Expand Down
10 changes: 6 additions & 4 deletions version/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var (
Current = &Semantic{
Major: 0,
Minor: 4,
Patch: 10,
Patch: 11,
}
CurrentApp = &Application{
Major: Current.Major,
Expand All @@ -45,7 +45,7 @@ var (
MinimumCompatibleVersion = &Application{
Major: 0,
Minor: 4,
Patch: 9,
Patch: 11,
}
PrevMinimumCompatibleVersion = &Application{
Major: 0,
Expand Down Expand Up @@ -112,7 +112,9 @@ var (
}
BanffDefaultTime = time.Date(2020, time.December, 5, 5, 0, 0, 0, time.UTC)

SunrisePhase1Times = map[uint32]time.Time{}
SunrisePhase1Times = map[uint32]time.Time{
constants.KopernikusID: time.Date(2023, time.July, 3, 9, 0, 0, 0, time.UTC),
}
SunrisePhase1DefaultTime = time.Date(2022, time.May, 1, 0, 0, 0, 0, time.UTC)

// TODO: update this before release
Expand Down Expand Up @@ -211,7 +213,7 @@ func GetCompatibility(networkID uint32) Compatibility {
return NewCompatibility(
CurrentApp,
MinimumCompatibleVersion,
GetBanffTime(networkID),
GetSunrisePhase1Time(networkID),
PrevMinimumCompatibleVersion,
)
}
2 changes: 2 additions & 0 deletions vms/platformvm/txs/camino_address_state_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ const (
AddressStateOffersCreator AddressState = AddressState(1) << AddressStateBitOffersCreator // 0b100000000000000000000000000000000000000000000000000

AddressStateValidBits = AddressStateRoleAll | AddressStateKYCAll | AddressStateVotableBits | AddressStateOffersCreator // 0b100000000001100001100000000000000000000000000000111

AddressStateSunrisePhase1Bits = AddressStateRoleOffersAdmin | AddressStateOffersCreator
)

var (
Expand Down
6 changes: 6 additions & 0 deletions vms/platformvm/txs/executor/camino_tx_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1706,6 +1706,12 @@ func (e *CaminoStandardTxExecutor) AddressStateTx(tx *txs.AddressStateTx) error
}
statesBit := txs.AddressState(1) << tx.State

// Check for SunrisePhase1 Bits if we time has not passed yet
if (statesBit&txs.AddressStateSunrisePhase1Bits) != 0 &&
!e.Config.IsSunrisePhase1Activated(e.State.GetTimestamp()) {
return errAddrStateNotPermitted
}

// Verify that roles are allowed to modify tx.State
if !verifyAccess(roles, statesBit) {
return fmt.Errorf("%w (addr: %s, bit: %b)", errAddrStateNotPermitted, tx.Address, tx.State)
Expand Down

0 comments on commit fee8858

Please sign in to comment.