Skip to content

Commit

Permalink
Merge c162a3c into f52501f
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinxie committed Oct 25, 2023
2 parents f52501f + c162a3c commit 3ef78ab
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
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))
}

0 comments on commit 3ef78ab

Please sign in to comment.