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

Fix genesis flags 2024.04.25 #6141

Merged
merged 2 commits into from
Apr 25, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions genesis/process/shardGenesisBlockCreator.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func createGenesisConfig(providedEnableEpochs config.EnableEpochs) config.Enable
NodesToShufflePerShard: 0,
},
}
clonedConfig.StakeEnableEpoch = unreachableEpoch // we need to specifically disable this, we have exceptions in the staking system SC
clonedConfig.DoubleKeyProtectionEnableEpoch = 0

return clonedConfig
Expand Down
7 changes: 7 additions & 0 deletions node/chainSimulator/chainSimulator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/multiversx/mx-chain-core-go/core"
coreAPI "github.com/multiversx/mx-chain-core-go/data/api"
"github.com/multiversx/mx-chain-core-go/data/transaction"
"github.com/multiversx/mx-chain-go/config"
"github.com/multiversx/mx-chain-go/node/chainSimulator/components/api"
"github.com/multiversx/mx-chain-go/node/chainSimulator/configs"
"github.com/multiversx/mx-chain-go/node/chainSimulator/dtos"
Expand Down Expand Up @@ -72,6 +73,12 @@ func TestChainSimulator_GenerateBlocksShouldWork(t *testing.T) {
InitialRound: 200000000,
InitialEpoch: 100,
InitialNonce: 100,
AlterConfigsFunction: func(cfg *config.Configs) {
// we need to enable this as this test skips a lot of epoch activations events, and it will fail otherwise
// because the owner of a BLS key coming from genesis is not set
// (the owner is not set at genesis anymore because we do not enable the staking v2 in that phase)
cfg.EpochConfig.EnableEpochs.StakingV2EnableEpoch = 0
},
})
require.Nil(t, err)
require.NotNil(t, chainSimulator)
Expand Down