Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[genesis] set Redsea to activate at 11-05-2023 23:59pm UTC #3949

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions action/protocol/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ type (
ValidateSystemAction bool
AllowCorrectChainIDOnly bool
AddContractStakingVotes bool
SharedGasWithDapp bool
FixContractStakingWeightedVotes bool
SharedGasWithDapp bool
}

// FeatureWithHeightCtx provides feature check functions.
Expand Down Expand Up @@ -253,8 +253,8 @@ func WithFeatureCtx(ctx context.Context) context.Context {
ValidateSystemAction: g.IsQuebec(height),
AllowCorrectChainIDOnly: g.IsQuebec(height),
AddContractStakingVotes: g.IsQuebec(height),
SharedGasWithDapp: g.IsToBeEnabled(height),
FixContractStakingWeightedVotes: g.IsRedsea(height),
SharedGasWithDapp: g.IsToBeEnabled(height),
},
)
}
Expand Down
4 changes: 2 additions & 2 deletions action/protocol/execution/evm/evm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ func TestConstantinople(t *testing.T) {
},
{
"io1pcg2ja9krrhujpazswgz77ss46xgt88afqlk6y",
34838200,
26704440,
},
// after Redsea
{
action.EmptyAddress,
34838201,
26704441,
},
{
"io1pcg2ja9krrhujpazswgz77ss46xgt88afqlk6y",
Expand Down
6 changes: 4 additions & 2 deletions blockchain/genesis/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func defaultConfig() Genesis {
OkhotskBlockHeight: 21542761,
PalauBlockHeight: 22991401,
QuebecBlockHeight: 24838201,
RedseaBlockHeight: 34838201,
RedseaBlockHeight: 26704441,
ToBeEnabledBlockHeight: math.MaxUint64,
},
Account: Account{
Expand Down Expand Up @@ -239,7 +239,9 @@ type (
// 2. enable IIP-13 liquidity staking
// 3. valiate system action layout
QuebecBlockHeight uint64 `yaml:"quebecHeight"`
// RedseaBlockHeight is the start height to enable Shanghai EVM
// RedseaBlockHeight is the start height to
// 1. upgrade go-ethereum to Bellatrix release
// 2. correct weighted votes for contract staking bucket
RedseaBlockHeight uint64 `yaml:"redseaHeight"`
// ToBeEnabledBlockHeight is a fake height that acts as a gating factor for WIP features
// upon next release, change IsToBeEnabled() to IsNextHeight() for features to be released
Expand Down
6 changes: 3 additions & 3 deletions blockchain/genesis/heightupgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ func TestNewHeightChange(t *testing.T) {
require.True(cfg.IsPalau(uint64(22991401)))
require.False(cfg.IsQuebec(uint64(24838200)))
require.True(cfg.IsQuebec(uint64(24838201)))
require.False(cfg.IsRedsea(uint64(34838200)))
require.True(cfg.IsRedsea(uint64(34838201)))
require.False(cfg.IsRedsea(uint64(26704440)))
require.True(cfg.IsRedsea(uint64(26704441)))

require.Equal(cfg.PacificBlockHeight, uint64(432001))
require.Equal(cfg.AleutianBlockHeight, uint64(864001))
Expand All @@ -80,5 +80,5 @@ func TestNewHeightChange(t *testing.T) {
require.Equal(cfg.OkhotskBlockHeight, uint64(21542761))
require.Equal(cfg.PalauBlockHeight, uint64(22991401))
require.Equal(cfg.QuebecBlockHeight, uint64(24838201))
require.Equal(cfg.RedseaBlockHeight, uint64(34838201))
require.Equal(cfg.RedseaBlockHeight, uint64(26704441))
}