Skip to content

Commit 2e55c60

Browse files
Merge pull request #5877 from multiversx/MX-15032
MX-15032: MaxVotingDelayPeriodInEpochs
2 parents 8fa9408 + eb8e6b6 commit 2e55c60

File tree

15 files changed

+147
-86
lines changed

15 files changed

+147
-86
lines changed

cmd/node/config/systemSmartContractsConfig.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
[GovernanceSystemSCConfig]
2020
OwnerAddress = "erd1vxy22x0fj4zv6hktmydg8vpfh6euv02cz4yg0aaws6rrad5a5awqgqky80" #should use a multisign contract instead of a wallet address
21+
MaxVotingDelayPeriodInEpochs = 30
2122
[GovernanceSystemSCConfig.V1]
2223
NumNodes = 500
2324
ProposalCost = "5000000000000000000" #5 eGLD

config/systemSmartContractsConfig.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type ESDTSystemSCConfig struct {
3232
}
3333

3434
// GovernanceSystemSCConfigV1 holds the initial set of values that were used to initialise the
35-
// governance system smart contract at genesis time
35+
// governance system smart contract at genesis time
3636
type GovernanceSystemSCConfigV1 struct {
3737
NumNodes int64
3838
ProposalCost string
@@ -42,7 +42,7 @@ type GovernanceSystemSCConfigV1 struct {
4242
}
4343

4444
// GovernanceSystemSCConfigActive defines the set of configuration values used by the governance
45-
// system smart contract once it activates
45+
// system smart contract once it activates
4646
type GovernanceSystemSCConfigActive struct {
4747
ProposalCost string
4848
LostProposalFee string
@@ -53,9 +53,10 @@ type GovernanceSystemSCConfigActive struct {
5353

5454
// GovernanceSystemSCConfig defines the set of constants to initialize the governance system smart contract
5555
type GovernanceSystemSCConfig struct {
56-
V1 GovernanceSystemSCConfigV1
57-
Active GovernanceSystemSCConfigActive
58-
OwnerAddress string
56+
V1 GovernanceSystemSCConfigV1
57+
Active GovernanceSystemSCConfigActive
58+
OwnerAddress string
59+
MaxVotingDelayPeriodInEpochs uint32
5960
}
6061

6162
// DelegationManagerSystemSCConfig defines a set of constants to initialize the delegation manager system smart contract

epochStart/metachain/systemSCs_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,8 @@ func createFullArgumentsForSystemSCProcessing(enableEpochsConfig config.EnableEp
10171017
MinVetoThreshold: 0.5,
10181018
LostProposalFee: "1",
10191019
},
1020-
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
1020+
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
1021+
MaxVotingDelayPeriodInEpochs: 30,
10211022
},
10221023
StakingSystemSCConfig: config.StakingSystemSCConfig{
10231024
GenesisNodePrice: "1000",

factory/processing/processComponents_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ func createMockProcessComponentsFactoryArgs() processComp.ProcessComponentsFacto
124124
MinPassThreshold: 0.5,
125125
MinVetoThreshold: 0.5,
126126
},
127-
OwnerAddress: "erd1vxy22x0fj4zv6hktmydg8vpfh6euv02cz4yg0aaws6rrad5a5awqgqky80",
127+
OwnerAddress: "erd1vxy22x0fj4zv6hktmydg8vpfh6euv02cz4yg0aaws6rrad5a5awqgqky80",
128+
MaxVotingDelayPeriodInEpochs: 30,
128129
},
129130
StakingSystemSCConfig: config.StakingSystemSCConfig{
130131
GenesisNodePrice: "2500000000000000000000",

genesis/process/genesisBlockCreator_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ func createMockArgument(
137137
MinVetoThreshold: 0.5,
138138
LostProposalFee: "1",
139139
},
140-
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
140+
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
141+
MaxVotingDelayPeriodInEpochs: 30,
141142
},
142143
StakingSystemSCConfig: config.StakingSystemSCConfig{
143144
GenesisNodePrice: nodePrice.Text(10),

integrationTests/multiShard/hardFork/hardFork_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,8 @@ func hardForkImport(
451451
MinVetoThreshold: 0.5,
452452
LostProposalFee: "1",
453453
},
454-
OwnerAddress: integrationTests.DelegationManagerConfigChangeAddress,
454+
OwnerAddress: integrationTests.DelegationManagerConfigChangeAddress,
455+
MaxVotingDelayPeriodInEpochs: 30,
455456
},
456457
StakingSystemSCConfig: config.StakingSystemSCConfig{
457458
GenesisNodePrice: "1000",

integrationTests/testInitializer.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,8 @@ func CreateFullGenesisBlocks(
691691
OwnerAddress: "aaaaaa",
692692
},
693693
GovernanceSystemSCConfig: config.GovernanceSystemSCConfig{
694-
OwnerAddress: DelegationManagerConfigChangeAddress,
694+
OwnerAddress: DelegationManagerConfigChangeAddress,
695+
MaxVotingDelayPeriodInEpochs: 30,
695696
V1: config.GovernanceSystemSCConfigV1{
696697
ProposalCost: "500",
697698
},
@@ -808,7 +809,8 @@ func CreateGenesisMetaBlock(
808809
MinVetoThreshold: 0.5,
809810
LostProposalFee: "1",
810811
},
811-
OwnerAddress: DelegationManagerConfigChangeAddress,
812+
OwnerAddress: DelegationManagerConfigChangeAddress,
813+
MaxVotingDelayPeriodInEpochs: 30,
812814
},
813815
StakingSystemSCConfig: config.StakingSystemSCConfig{
814816
GenesisNodePrice: "1000",

integrationTests/testProcessorNode.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,8 @@ func (tpn *TestProcessorNode) createFullSCQueryService(gasMap map[string]map[str
927927
MinVetoThreshold: 0.5,
928928
LostProposalFee: "1",
929929
},
930-
OwnerAddress: DelegationManagerConfigChangeAddress,
930+
OwnerAddress: DelegationManagerConfigChangeAddress,
931+
MaxVotingDelayPeriodInEpochs: 30,
931932
},
932933
StakingSystemSCConfig: config.StakingSystemSCConfig{
933934
GenesisNodePrice: "1000",
@@ -1882,7 +1883,8 @@ func (tpn *TestProcessorNode) initMetaInnerProcessors(gasMap map[string]map[stri
18821883
MinVetoThreshold: 0.5,
18831884
LostProposalFee: "1",
18841885
},
1885-
OwnerAddress: DelegationManagerConfigChangeAddress,
1886+
OwnerAddress: DelegationManagerConfigChangeAddress,
1887+
MaxVotingDelayPeriodInEpochs: 30,
18861888
},
18871889
StakingSystemSCConfig: config.StakingSystemSCConfig{
18881890
GenesisNodePrice: "1000",

integrationTests/vm/testInitializer.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,8 @@ func createSystemSCConfig() *config.SystemSmartContractsConfig {
749749
MinVetoThreshold: 0.5,
750750
LostProposalFee: "1",
751751
},
752-
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
752+
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
753+
MaxVotingDelayPeriodInEpochs: 30,
753754
},
754755
StakingSystemSCConfig: config.StakingSystemSCConfig{
755756
GenesisNodePrice: "2500000000000000000000",

process/factory/metachain/vmContainerFactory_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,8 @@ func TestVmContainerFactory_Create(t *testing.T) {
328328
MinVetoThreshold: 0.5,
329329
LostProposalFee: "1",
330330
},
331-
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
331+
OwnerAddress: "3132333435363738393031323334353637383930313233343536373839303234",
332+
MaxVotingDelayPeriodInEpochs: 30,
332333
},
333334
StakingSystemSCConfig: config.StakingSystemSCConfig{
334335
GenesisNodePrice: "1000",

0 commit comments

Comments
 (0)