Skip to content

Commit

Permalink
Merge pull request #6141 from multiversx/fix-genesis-flags-2024.04.25
Browse files Browse the repository at this point in the history
Fix genesis flags 2024.04.25
  • Loading branch information
miiu96 authored Apr 25, 2024
2 parents 52a19be + 66e5d41 commit 8732346
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
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

0 comments on commit 8732346

Please sign in to comment.