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

Feat/governance fixes #6490

Open
wants to merge 51 commits into
base: rc/barnard
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
6ef1556
MX-15029: Accept multiple delegateVoting
dragos-rebegea Jan 19, 2024
d50e7d9
MX-15029: make saveUserVotes backword compatible
dragos-rebegea Jan 22, 2024
3a04c1a
MX-15029: add deactivation propose flag
dragos-rebegea Jan 23, 2024
2c233f4
MX-15029: fixes after review
dragos-rebegea Jan 25, 2024
df53ca0
MX-15047: add gasUsage for changeConfig
dragos-rebegea Jan 25, 2024
640162f
MX-15032: MaxVotingDelayPeriodInEpochs
dragos-rebegea Jan 26, 2024
c45d12b
MX-15032: fix tests
dragos-rebegea Jan 26, 2024
5cb1114
MX-15029: fix naming
dragos-rebegea Jan 29, 2024
87e0efd
MX-15047: add gasUsage for ClaimAccumulatedFees
dragos-rebegea Jan 29, 2024
9c89cc3
MX-15029: check double vote is not allowed
dragos-rebegea Jan 29, 2024
a0e0d59
MX-15029: fix enableEpochsHandler test
dragos-rebegea Jan 29, 2024
5693577
MX-15029: fixes after review
dragos-rebegea Feb 1, 2024
f178fc7
MX-15029: fixes after review
dragos-rebegea Feb 1, 2024
898267e
MX-15029: test delegateVote with stored OngoingListV1
dragos-rebegea Feb 5, 2024
70fde80
MX-15029: remove unused method
dragos-rebegea Feb 5, 2024
067d880
MX-15029: remove unreachable code
dragos-rebegea Feb 5, 2024
78a4644
MX-15029: add more tests
dragos-rebegea Feb 5, 2024
8fa9408
Merge pull request #5857 from multiversx/MX-15029
dragos-rebegea Feb 5, 2024
0e1940d
MX-15033: processLastEndedNonce
dragos-rebegea Feb 5, 2024
c5103a0
MX-15033: clearEndedProposals implementation
dragos-rebegea Feb 5, 2024
5eee09b
Merge branch 'feat/governance-fixes' into MX-15032
dragos-rebegea Feb 5, 2024
2a18830
MX-15033: add more tests
dragos-rebegea Feb 6, 2024
c4a238b
Merge branch 'feat/governance-fixes' into MX-15047
dragos-rebegea Sep 23, 2024
eb8e6b6
MX-15032: fix comments
dragos-rebegea Sep 23, 2024
20651ec
MX-15033: fixes after review
dragos-rebegea Sep 23, 2024
2e55c60
Merge pull request #5877 from multiversx/MX-15032
dragos-rebegea Sep 23, 2024
3bd015c
Merge branch 'feat/governance-fixes' into MX-15047
dragos-rebegea Sep 23, 2024
07f949b
MX-15033: fixes after review
dragos-rebegea Sep 23, 2024
b3f5b09
Merge branch 'feat/governance-fixes' into MX-15033
dragos-rebegea Sep 23, 2024
1a111a2
MX-15033: fixes after review
dragos-rebegea Sep 23, 2024
af64500
MX-15033: fixes after review
dragos-rebegea Sep 23, 2024
9828736
MX-15033: fixes after review
dragos-rebegea Sep 23, 2024
d0217f6
MX-15033: fixes after review
dragos-rebegea Sep 23, 2024
ae97313
Merge remote-tracking branch 'origin/rc/v1.8.0' into feat/governance-…
dragos-rebegea Sep 23, 2024
e8123b5
MX-15033: fixes after review
dragos-rebegea Sep 24, 2024
fc997c4
Merge pull request #5872 from multiversx/MX-15047
dragos-rebegea Sep 24, 2024
f74ad34
Merge remote-tracking branch 'origin/feat/governance-fixes' into MX-1…
dragos-rebegea Sep 24, 2024
85028c0
MX-15033: add callValue check for ClearEndedProposals
dragos-rebegea Sep 24, 2024
359ea37
MX-15033: make the gasCost more clear
dragos-rebegea Sep 24, 2024
5739ad1
Merge pull request #5922 from multiversx/MX-15033
dragos-rebegea Sep 24, 2024
fe2a6cb
Merge remote-tracking branch 'origin/feat/governance-fixes' into merg…
dragos-rebegea Sep 24, 2024
5b4b719
fixes after merge
dragos-rebegea Sep 24, 2024
51bcc3e
Merge pull request #6491 from multiversx/merge-rc-v1.8.0-feat-governa…
iulianpascalau Sep 24, 2024
a7681da
MX-15031: Add cancel method before voting start
dragos-rebegea Sep 24, 2024
f5da2c9
MX-15031: refactor and tests
dragos-rebegea Sep 25, 2024
1a2a505
MX-15031: add extra check
dragos-rebegea Sep 25, 2024
499b2f6
MX-15031: fix test
dragos-rebegea Sep 25, 2024
7791a43
MX-15031: add boundary tests
dragos-rebegea Sep 25, 2024
233c48d
Merge pull request #6496 from multiversx/MX-15031
dragos-rebegea Oct 2, 2024
46f442d
Optimize GitHub workflows.
andreibancioiu Oct 3, 2024
4077ac2
Merge pull request #6519 from multiversx/optimize-workflows-governance
AdoAdoAdo Oct 4, 2024
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
6 changes: 6 additions & 0 deletions cmd/node/config/enableEpochs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@
# GovernanceEnableEpoch represents the epoch when governance is enabled
GovernanceEnableEpoch = 1

# GovernanceDisableProposeEnableEpoch represents the epoch when governance disable proposal is enabled
GovernanceDisableProposeEnableEpoch = 6

# GovernanceFixesEnableEpoch represents the epoch when governance fixes are enabled
GovernanceFixesEnableEpoch = 7

# DelegationManagerEnableEpoch represents the epoch when the delegation manager is enabled
# epoch should not be 0
DelegationManagerEnableEpoch = 1
Expand Down
3 changes: 3 additions & 0 deletions cmd/node/config/gasSchedules/gasScheduleV1.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
DelegateVote = 1000000
RevokeVote = 500000
CloseProposal = 1000000
ClearProposal = 1000000
ClaimAccumulatedFees = 1000000
ChangeConfig = 50000000
DelegationOps = 1000000
UnstakeTokens = 5000000
UnbondTokens = 5000000
Expand Down
3 changes: 3 additions & 0 deletions cmd/node/config/gasSchedules/gasScheduleV2.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
DelegateVote = 1000000
RevokeVote = 500000
CloseProposal = 1000000
ClearProposal = 1000000
ClaimAccumulatedFees = 1000000
ChangeConfig = 50000000
DelegationOps = 1000000
UnstakeTokens = 5000000
UnbondTokens = 5000000
Expand Down
3 changes: 3 additions & 0 deletions cmd/node/config/gasSchedules/gasScheduleV3.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
DelegateVote = 50000000
RevokeVote = 50000000
CloseProposal = 50000000
ClearProposal = 50000000
ClaimAccumulatedFees = 1000000
ChangeConfig = 50000000
GetAllNodeStates = 20000000
UnstakeTokens = 5000000
UnbondTokens = 5000000
Expand Down
3 changes: 3 additions & 0 deletions cmd/node/config/gasSchedules/gasScheduleV4.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
DelegateVote = 50000000
RevokeVote = 50000000
CloseProposal = 50000000
ClearProposal = 50000000
ClaimAccumulatedFees = 1000000
ChangeConfig = 50000000
GetAllNodeStates = 20000000
UnstakeTokens = 5000000
UnbondTokens = 5000000
Expand Down
3 changes: 3 additions & 0 deletions cmd/node/config/gasSchedules/gasScheduleV5.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
DelegateVote = 50000000
RevokeVote = 50000000
CloseProposal = 50000000
ClearProposal = 50000000
ClaimAccumulatedFees = 1000000
ChangeConfig = 50000000
GetAllNodeStates = 20000000
UnstakeTokens = 5000000
UnbondTokens = 5000000
Expand Down
3 changes: 3 additions & 0 deletions cmd/node/config/gasSchedules/gasScheduleV6.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
DelegateVote = 50000000
RevokeVote = 50000000
CloseProposal = 50000000
ClearProposal = 50000000
ClaimAccumulatedFees = 1000000
ChangeConfig = 50000000
GetAllNodeStates = 20000000
UnstakeTokens = 5000000
UnbondTokens = 5000000
Expand Down
3 changes: 3 additions & 0 deletions cmd/node/config/gasSchedules/gasScheduleV7.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
DelegateVote = 50000000
RevokeVote = 50000000
CloseProposal = 50000000
ClearProposal = 50000000
ClaimAccumulatedFees = 1000000
ChangeConfig = 50000000
GetAllNodeStates = 20000000
UnstakeTokens = 5000000
UnbondTokens = 5000000
Expand Down
5 changes: 4 additions & 1 deletion cmd/node/config/gasSchedules/gasScheduleV8.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
DelegateVote = 50000000
RevokeVote = 50000000
CloseProposal = 50000000
ClearProposal = 50000000
ClaimAccumulatedFees = 1000000
ChangeConfig = 50000000
GetAllNodeStates = 20000000
UnstakeTokens = 5000000
UnbondTokens = 5000000
Expand Down Expand Up @@ -215,7 +218,7 @@
EncodeDERSig = 10000000
VerifySecp256r1 = 2000000
VerifyBLSSignatureShare = 2000000
VerifyBLSMultiSig = 2000000
VerifyBLSMultiSig = 2000000

[ManagedBufferAPICost]
MBufferNew = 2000
Expand Down
1 change: 1 addition & 0 deletions cmd/node/config/systemSmartContractsConfig.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

[GovernanceSystemSCConfig]
OwnerAddress = "erd1vxy22x0fj4zv6hktmydg8vpfh6euv02cz4yg0aaws6rrad5a5awqgqky80" #should use a multisign contract instead of a wallet address
MaxVotingDelayPeriodInEpochs = 30
[GovernanceSystemSCConfig.V1]
NumNodes = 500
ProposalCost = "5000000000000000000" #5 eGLD
Expand Down
2 changes: 2 additions & 0 deletions common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,8 @@ const (
ESDTFlag core.EnableEpochFlag = "ESDTFlag"
ESDTFlagInSpecificEpochOnly core.EnableEpochFlag = "ESDTFlagInSpecificEpochOnly"
GovernanceFlag core.EnableEpochFlag = "GovernanceFlag"
GovernanceDisableProposeFlag core.EnableEpochFlag = "GovernanceDisableProposeFlag"
GovernanceFixesFlag core.EnableEpochFlag = "GovernanceFixesFlag"
GovernanceFlagInSpecificEpochOnly core.EnableEpochFlag = "GovernanceFlagInSpecificEpochOnly"
DelegationManagerFlag core.EnableEpochFlag = "DelegationManagerFlag"
DelegationSmartContractFlag core.EnableEpochFlag = "DelegationSmartContractFlag"
Expand Down
12 changes: 12 additions & 0 deletions common/enablers/enableEpochsHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,18 @@ func (handler *enableEpochsHandler) createAllFlagsMap() {
},
activationEpoch: handler.enableEpochsConfig.GovernanceEnableEpoch,
},
common.GovernanceDisableProposeFlag: {
isActiveInEpoch: func(epoch uint32) bool {
return epoch >= handler.enableEpochsConfig.GovernanceDisableProposeEnableEpoch
},
activationEpoch: handler.enableEpochsConfig.GovernanceDisableProposeEnableEpoch,
},
common.GovernanceFixesFlag: {
isActiveInEpoch: func(epoch uint32) bool {
return epoch >= handler.enableEpochsConfig.GovernanceFixesEnableEpoch
},
activationEpoch: handler.enableEpochsConfig.GovernanceFixesEnableEpoch,
},
common.DelegationManagerFlag: {
isActiveInEpoch: func(epoch uint32) bool {
return epoch >= handler.enableEpochsConfig.DelegationManagerEnableEpoch
Expand Down
6 changes: 6 additions & 0 deletions common/enablers/enableEpochsHandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ func createEnableEpochsConfig() config.EnableEpochs {
DoubleKeyProtectionEnableEpoch: 19,
ESDTEnableEpoch: 20,
GovernanceEnableEpoch: 21,
GovernanceDisableProposeEnableEpoch: 22,
GovernanceFixesEnableEpoch: 23,
DelegationManagerEnableEpoch: 22,
DelegationSmartContractEnableEpoch: 23,
CorrectLastUnjailedEnableEpoch: 24,
Expand Down Expand Up @@ -231,6 +233,8 @@ func TestEnableEpochsHandler_IsFlagEnabled(t *testing.T) {
require.False(t, handler.IsFlagEnabled(common.ESDTFlagInSpecificEpochOnly)) // ==
require.True(t, handler.IsFlagEnabled(common.GovernanceFlag))
require.False(t, handler.IsFlagEnabled(common.GovernanceFlagInSpecificEpochOnly)) // ==
require.True(t, handler.IsFlagEnabled(common.GovernanceDisableProposeFlag)) // ==
require.True(t, handler.IsFlagEnabled(common.GovernanceFixesFlag)) // ==
require.True(t, handler.IsFlagEnabled(common.DelegationManagerFlag))
require.True(t, handler.IsFlagEnabled(common.DelegationSmartContractFlag))
require.False(t, handler.IsFlagEnabled(common.DelegationSmartContractFlagInSpecificEpochOnly)) // ==
Expand Down Expand Up @@ -351,6 +355,8 @@ func TestEnableEpochsHandler_GetActivationEpoch(t *testing.T) {
require.Equal(t, cfg.DoubleKeyProtectionEnableEpoch, handler.GetActivationEpoch(common.DoubleKeyProtectionFlag))
require.Equal(t, cfg.ESDTEnableEpoch, handler.GetActivationEpoch(common.ESDTFlag))
require.Equal(t, cfg.GovernanceEnableEpoch, handler.GetActivationEpoch(common.GovernanceFlag))
require.Equal(t, cfg.GovernanceDisableProposeEnableEpoch, handler.GetActivationEpoch(common.GovernanceDisableProposeFlag))
require.Equal(t, cfg.GovernanceFixesEnableEpoch, handler.GetActivationEpoch(common.GovernanceFixesFlag))
require.Equal(t, cfg.DelegationManagerEnableEpoch, handler.GetActivationEpoch(common.DelegationManagerFlag))
require.Equal(t, cfg.DelegationSmartContractEnableEpoch, handler.GetActivationEpoch(common.DelegationSmartContractFlag))
require.Equal(t, cfg.CorrectLastUnjailedEnableEpoch, handler.GetActivationEpoch(common.CorrectLastUnJailedFlag))
Expand Down
2 changes: 2 additions & 0 deletions config/epochConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ type EnableEpochs struct {
DoubleKeyProtectionEnableEpoch uint32
ESDTEnableEpoch uint32
GovernanceEnableEpoch uint32
GovernanceDisableProposeEnableEpoch uint32
GovernanceFixesEnableEpoch uint32
DelegationManagerEnableEpoch uint32
DelegationSmartContractEnableEpoch uint32
CorrectLastUnjailedEnableEpoch uint32
Expand Down
7 changes: 4 additions & 3 deletions config/systemSmartContractsConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ type GovernanceSystemSCConfigActive struct {

// GovernanceSystemSCConfig defines the set of constants to initialize the governance system smart contract
type GovernanceSystemSCConfig struct {
V1 GovernanceSystemSCConfigV1
Active GovernanceSystemSCConfigActive
OwnerAddress string
V1 GovernanceSystemSCConfigV1
Active GovernanceSystemSCConfigActive
OwnerAddress string
MaxVotingDelayPeriodInEpochs uint32
}

// DelegationManagerSystemSCConfig defines a set of constants to initialize the delegation manager system smart contract
Expand Down
8 changes: 8 additions & 0 deletions config/tomlConfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,12 @@ func TestEnableEpochConfig(t *testing.T) {
# GovernanceEnableEpoch represents the epoch when governance is enabled
GovernanceEnableEpoch = 21

# GovernanceDisableProposeEnableEpoch represents the epoch when governance disable proposal is enabled
GovernanceDisableProposeEnableEpoch = 22

# GovernanceFixesEnableEpoch represents the epoch when governance fixes are enabled
GovernanceFixesEnableEpoch = 23

# DelegationManagerEnableEpoch represents the epoch when the delegation manager is enabled
# epoch should not be 0
DelegationManagerEnableEpoch = 22
Expand Down Expand Up @@ -922,6 +928,8 @@ func TestEnableEpochConfig(t *testing.T) {
DoubleKeyProtectionEnableEpoch: 19,
ESDTEnableEpoch: 20,
GovernanceEnableEpoch: 21,
GovernanceDisableProposeEnableEpoch: 22,
GovernanceFixesEnableEpoch: 23,
DelegationManagerEnableEpoch: 22,
DelegationSmartContractEnableEpoch: 23,
CorrectLastUnjailedEnableEpoch: 24,
Expand Down
3 changes: 2 additions & 1 deletion epochStart/metachain/systemSCs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,8 @@ func createFullArgumentsForSystemSCProcessing(enableEpochsConfig config.EnableEp
MinVetoThreshold: 0.5,
LostProposalFee: "1",
},
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
MaxVotingDelayPeriodInEpochs: 30,
},
StakingSystemSCConfig: config.StakingSystemSCConfig{
GenesisNodePrice: "1000",
Expand Down
3 changes: 2 additions & 1 deletion factory/processing/processComponents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ func createMockProcessComponentsFactoryArgs() processComp.ProcessComponentsFacto
MinPassThreshold: 0.5,
MinVetoThreshold: 0.5,
},
OwnerAddress: "erd1vxy22x0fj4zv6hktmydg8vpfh6euv02cz4yg0aaws6rrad5a5awqgqky80",
OwnerAddress: "erd1vxy22x0fj4zv6hktmydg8vpfh6euv02cz4yg0aaws6rrad5a5awqgqky80",
MaxVotingDelayPeriodInEpochs: 30,
},
StakingSystemSCConfig: config.StakingSystemSCConfig{
GenesisNodePrice: "2500",
Expand Down
3 changes: 2 additions & 1 deletion genesis/process/genesisBlockCreator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ func createMockArgument(
MinVetoThreshold: 0.5,
LostProposalFee: "1",
},
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
MaxVotingDelayPeriodInEpochs: 30,
},
StakingSystemSCConfig: config.StakingSystemSCConfig{
GenesisNodePrice: nodePrice.Text(10),
Expand Down
3 changes: 2 additions & 1 deletion integrationTests/multiShard/hardFork/hardFork_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ func hardForkImport(
MinVetoThreshold: 0.5,
LostProposalFee: "1",
},
OwnerAddress: integrationTests.DelegationManagerConfigChangeAddress,
OwnerAddress: integrationTests.DelegationManagerConfigChangeAddress,
MaxVotingDelayPeriodInEpochs: 30,
},
StakingSystemSCConfig: config.StakingSystemSCConfig{
GenesisNodePrice: "1000",
Expand Down
6 changes: 4 additions & 2 deletions integrationTests/testInitializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,8 @@ func CreateFullGenesisBlocks(
OwnerAddress: "aaaaaa",
},
GovernanceSystemSCConfig: config.GovernanceSystemSCConfig{
OwnerAddress: DelegationManagerConfigChangeAddress,
OwnerAddress: DelegationManagerConfigChangeAddress,
MaxVotingDelayPeriodInEpochs: 30,
V1: config.GovernanceSystemSCConfigV1{
ProposalCost: "500",
},
Expand Down Expand Up @@ -818,7 +819,8 @@ func CreateGenesisMetaBlock(
MinVetoThreshold: 0.5,
LostProposalFee: "1",
},
OwnerAddress: DelegationManagerConfigChangeAddress,
OwnerAddress: DelegationManagerConfigChangeAddress,
MaxVotingDelayPeriodInEpochs: 30,
},
StakingSystemSCConfig: config.StakingSystemSCConfig{
GenesisNodePrice: "1000",
Expand Down
8 changes: 6 additions & 2 deletions integrationTests/testProcessorNode.go
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,8 @@ func (tpn *TestProcessorNode) createFullSCQueryService(gasMap map[string]map[str
MinVetoThreshold: 0.5,
LostProposalFee: "1",
},
OwnerAddress: DelegationManagerConfigChangeAddress,
OwnerAddress: DelegationManagerConfigChangeAddress,
MaxVotingDelayPeriodInEpochs: 30,
},
StakingSystemSCConfig: config.StakingSystemSCConfig{
GenesisNodePrice: "1000",
Expand Down Expand Up @@ -1925,7 +1926,8 @@ func (tpn *TestProcessorNode) initMetaInnerProcessors(gasMap map[string]map[stri
MinVetoThreshold: 0.5,
LostProposalFee: "1",
},
OwnerAddress: DelegationManagerConfigChangeAddress,
OwnerAddress: DelegationManagerConfigChangeAddress,
MaxVotingDelayPeriodInEpochs: 30,
},
StakingSystemSCConfig: config.StakingSystemSCConfig{
GenesisNodePrice: "1000",
Expand Down Expand Up @@ -3230,6 +3232,8 @@ func CreateEnableEpochsConfig() config.EnableEpochs {
DoubleKeyProtectionEnableEpoch: 0,
ESDTEnableEpoch: UnreachableEpoch,
GovernanceEnableEpoch: UnreachableEpoch,
GovernanceDisableProposeEnableEpoch: UnreachableEpoch,
GovernanceFixesEnableEpoch: UnreachableEpoch,
DelegationManagerEnableEpoch: UnreachableEpoch,
DelegationSmartContractEnableEpoch: UnreachableEpoch,
CorrectLastUnjailedEnableEpoch: UnreachableEpoch,
Expand Down
3 changes: 2 additions & 1 deletion integrationTests/vm/testInitializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,8 @@ func createSystemSCConfig() *config.SystemSmartContractsConfig {
MinVetoThreshold: 0.5,
LostProposalFee: "1",
},
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
MaxVotingDelayPeriodInEpochs: 30,
},
StakingSystemSCConfig: config.StakingSystemSCConfig{
GenesisNodePrice: "2500000000000000000000",
Expand Down
2 changes: 2 additions & 0 deletions node/nodeRunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ func printEnableEpochs(configs *config.Configs) {
log.Debug(readEpochFor("double key protection"), "epoch", enableEpochs.DoubleKeyProtectionEnableEpoch)
log.Debug(readEpochFor("esdt"), "epoch", enableEpochs.ESDTEnableEpoch)
log.Debug(readEpochFor("governance"), "epoch", enableEpochs.GovernanceEnableEpoch)
log.Debug(readEpochFor("governance disable proposal"), "epoch", enableEpochs.GovernanceDisableProposeEnableEpoch)
log.Debug(readEpochFor("governance fixes"), "epoch", enableEpochs.GovernanceFixesEnableEpoch)
log.Debug(readEpochFor("delegation manager"), "epoch", enableEpochs.DelegationManagerEnableEpoch)
log.Debug(readEpochFor("delegation smart contract"), "epoch", enableEpochs.DelegationSmartContractEnableEpoch)
log.Debug(readEpochFor("correct last unjailed"), "epoch", enableEpochs.CorrectLastUnjailedEnableEpoch)
Expand Down
6 changes: 5 additions & 1 deletion process/factory/metachain/vmContainerFactory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ func TestVmContainerFactory_Create(t *testing.T) {
MinVetoThreshold: 0.5,
LostProposalFee: "1",
},
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
MaxVotingDelayPeriodInEpochs: 30,
},
StakingSystemSCConfig: config.StakingSystemSCConfig{
GenesisNodePrice: "1000",
Expand Down Expand Up @@ -457,6 +458,9 @@ func FillGasMapMetaChainSystemSCsCosts(value uint64) map[string]uint64 {
gasMap["DelegateVote"] = value
gasMap["RevokeVote"] = value
gasMap["CloseProposal"] = value
gasMap["ClearProposal"] = value
gasMap["ClaimAccumulatedFees"] = value
gasMap["ChangeConfig"] = value
gasMap["DelegationOps"] = value
gasMap["UnStakeTokens"] = value
gasMap["UnBondTokens"] = value
Expand Down
6 changes: 5 additions & 1 deletion testscommon/components/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,8 @@ func GetProcessArgs(
MinVetoThreshold: 0.5,
LostProposalFee: "1",
},
OwnerAddress: "erd1vxy22x0fj4zv6hktmydg8vpfh6euv02cz4yg0aaws6rrad5a5awqgqky80",
OwnerAddress: "erd1vxy22x0fj4zv6hktmydg8vpfh6euv02cz4yg0aaws6rrad5a5awqgqky80",
MaxVotingDelayPeriodInEpochs: 30,
},
StakingSystemSCConfig: config.StakingSystemSCConfig{
GenesisNodePrice: "2500000000000000000000",
Expand Down Expand Up @@ -846,6 +847,9 @@ func FillGasMapMetaChainSystemSCsCosts(value uint64) map[string]uint64 {
gasMap["DelegateVote"] = value
gasMap["RevokeVote"] = value
gasMap["CloseProposal"] = value
gasMap["ClearProposal"] = value
gasMap["ClaimAccumulatedFees"] = value
gasMap["ChangeConfig"] = value
gasMap["DelegationOps"] = value
gasMap["UnStakeTokens"] = value
gasMap["UnBondTokens"] = value
Expand Down
23 changes: 12 additions & 11 deletions vm/factory/systemSCFactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,18 @@ func (scf *systemSCFactory) createGovernanceContract() (vm.SystemSmartContract,
}

argsGovernance := systemSmartContracts.ArgsNewGovernanceContract{
Eei: scf.systemEI,
GasCost: scf.gasCost,
GovernanceConfig: scf.systemSCConfig.GovernanceSystemSCConfig,
Marshalizer: scf.marshalizer,
Hasher: scf.hasher,
GovernanceSCAddress: vm.GovernanceSCAddress,
DelegationMgrSCAddress: vm.DelegationManagerSCAddress,
ValidatorSCAddress: vm.ValidatorSCAddress,
EnableEpochsHandler: scf.enableEpochsHandler,
UnBondPeriodInEpochs: scf.systemSCConfig.StakingSystemSCConfig.UnBondPeriodInEpochs,
OwnerAddress: ownerAddress,
Eei: scf.systemEI,
GasCost: scf.gasCost,
GovernanceConfig: scf.systemSCConfig.GovernanceSystemSCConfig,
Marshalizer: scf.marshalizer,
Hasher: scf.hasher,
GovernanceSCAddress: vm.GovernanceSCAddress,
DelegationMgrSCAddress: vm.DelegationManagerSCAddress,
ValidatorSCAddress: vm.ValidatorSCAddress,
EnableEpochsHandler: scf.enableEpochsHandler,
UnBondPeriodInEpochs: scf.systemSCConfig.StakingSystemSCConfig.UnBondPeriodInEpochs,
MaxVotingDelayPeriodInEpochs: scf.systemSCConfig.GovernanceSystemSCConfig.MaxVotingDelayPeriodInEpochs,
OwnerAddress: ownerAddress,
}
governance, err := systemSmartContracts.NewGovernanceContract(argsGovernance)
return governance, err
Expand Down
3 changes: 2 additions & 1 deletion vm/factory/systemSCFactory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ func createMockNewSystemScFactoryArgs() ArgsNewSystemSCFactory {
MinVetoThreshold: 0.5,
LostProposalFee: "1",
},
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
MaxVotingDelayPeriodInEpochs: 30,
},
StakingSystemSCConfig: config.StakingSystemSCConfig{
GenesisNodePrice: "1000",
Expand Down
Loading
Loading