From 59e3f114bbb4b23db60ed1cbdb1b984d0ad7ac2a Mon Sep 17 00:00:00 2001 From: Bernd Mueller Date: Wed, 11 Sep 2024 10:03:51 +0200 Subject: [PATCH] Adapt e2e tests to new permissionless logic --- tests/e2e/actions.go | 149 +++++++++--------- tests/e2e/steps_partial_set_security.go | 195 +++++++++++++++--------- tests/e2e/steps_permissionless_ics.go | 34 +++-- tests/e2e/steps_start_chains.go | 20 ++- 4 files changed, 234 insertions(+), 164 deletions(-) diff --git a/tests/e2e/actions.go b/tests/e2e/actions.go index 7cec626ec9..fa4cfda2cc 100644 --- a/tests/e2e/actions.go +++ b/tests/e2e/actions.go @@ -262,79 +262,81 @@ func (tr Chain) submitTextProposal( } type UpdateConsumerChainAction struct { - Chain ChainID - From ValidatorID - ConsumerChain ChainID - NewOwner string + Chain ChainID + From ValidatorID + ConsumerChain ChainID + NewOwner string + InitParams *InitializationParameters + PowerShapingParams *PowerShapingParameters +} + +type InitializationParameters struct { InitialHeight clienttypes.Height SpawnTime uint DistributionChannel string - TopN uint32 - ValidatorsPowerCap uint32 - ValidatorSetCap uint32 - Allowlist []string - Denylist []string - MinStake uint64 - AllowInactiveVals bool +} + +type PowerShapingParameters struct { + TopN uint32 + ValidatorsPowerCap uint32 + ValidatorSetCap uint32 + Allowlist []string + Denylist []string + MinStake uint64 + AllowInactiveVals bool } func (tr Chain) updateConsumerChain(action UpdateConsumerChainAction, verbose bool) { - spawnTime := tr.testConfig.containerConfig.Now.Add(time.Duration(action.SpawnTime) * time.Millisecond) - params := ccvtypes.DefaultParams() - initParams := types.ConsumerInitializationParameters{ - InitialHeight: action.InitialHeight, - GenesisHash: []byte("gen_hash"), - BinaryHash: []byte("bin_hash"), - SpawnTime: spawnTime, - UnbondingPeriod: params.UnbondingPeriod, - CcvTimeoutPeriod: params.CcvTimeoutPeriod, - TransferTimeoutPeriod: params.TransferTimeoutPeriod, - ConsumerRedistributionFraction: params.ConsumerRedistributionFraction, - BlocksPerDistributionTransmission: params.BlocksPerDistributionTransmission, - HistoricalEntries: params.HistoricalEntries, - DistributionTransmissionChannel: action.DistributionChannel, + var initParams *types.ConsumerInitializationParameters + if action.InitParams != nil { + spawnTime := tr.testConfig.containerConfig.Now.Add(time.Duration(action.InitParams.SpawnTime) * time.Millisecond) + params := ccvtypes.DefaultParams() + initParams = &types.ConsumerInitializationParameters{ + InitialHeight: action.InitParams.InitialHeight, + GenesisHash: []byte("gen_hash"), + BinaryHash: []byte("bin_hash"), + SpawnTime: spawnTime, + + UnbondingPeriod: params.UnbondingPeriod, + CcvTimeoutPeriod: params.CcvTimeoutPeriod, + TransferTimeoutPeriod: params.TransferTimeoutPeriod, + ConsumerRedistributionFraction: params.ConsumerRedistributionFraction, + BlocksPerDistributionTransmission: params.BlocksPerDistributionTransmission, + HistoricalEntries: params.HistoricalEntries, + DistributionTransmissionChannel: action.InitParams.DistributionChannel, + } } - powerShapingParams := types.PowerShapingParameters{ - Top_N: action.TopN, - ValidatorsPowerCap: action.ValidatorsPowerCap, - ValidatorSetCap: action.ValidatorSetCap, - Allowlist: action.Allowlist, - Denylist: action.Denylist, - MinStake: action.MinStake, - AllowInactiveVals: action.AllowInactiveVals, + Top_N: action.PowerShapingParams.TopN, + ValidatorsPowerCap: action.PowerShapingParams.ValidatorsPowerCap, + ValidatorSetCap: action.PowerShapingParams.ValidatorSetCap, + Allowlist: action.PowerShapingParams.Allowlist, + Denylist: action.PowerShapingParams.Denylist, + MinStake: action.PowerShapingParams.MinStake, + AllowInactiveVals: action.PowerShapingParams.AllowInactiveVals, } consumerId := tr.testConfig.chainConfigs[action.ConsumerChain].ConsumerId msg := types.MsgUpdateConsumer{ ConsumerId: string(consumerId), NewOwnerAddress: action.NewOwner, - InitializationParameters: &initParams, + InitializationParameters: initParams, PowerShapingParameters: &powerShapingParams, } tr.UpdateConsumer(action.Chain, action.From, msg, verbose) } type CreateConsumerChainAction struct { - Chain ChainID - From ValidatorID - ConsumerChain ChainID - InitialHeight clienttypes.Height - SpawnTime uint - DistributionChannel string - TopN uint32 - ValidatorsPowerCap uint32 - ValidatorSetCap uint32 - Allowlist []string - Denylist []string - MinStake uint64 - AllowInactiveVals bool + Chain ChainID + From ValidatorID + ConsumerChain ChainID + InitParams *InitializationParameters + PowerShapingParams *PowerShapingParameters } // createConsumerChain creates and initializes a consumer chain func (tr Chain) createConsumerChain(action CreateConsumerChainAction, verbose bool) { - spawnTime := tr.testConfig.containerConfig.Now.Add(time.Duration(action.SpawnTime) * time.Millisecond) consumerChainCfg := tr.testConfig.chainConfigs[action.ConsumerChain] providerChainCfg := tr.testConfig.chainConfigs[action.Chain] @@ -342,30 +344,33 @@ func (tr Chain) createConsumerChain(action CreateConsumerChainAction, verbose bo log.Fatalf("consumer chain already created for '%s'", action.ConsumerChain) } - params := ccvtypes.DefaultParams() - initParams := types.ConsumerInitializationParameters{ - InitialHeight: action.InitialHeight, - GenesisHash: []byte("gen_hash"), - BinaryHash: []byte("bin_hash"), - SpawnTime: spawnTime, - - UnbondingPeriod: params.UnbondingPeriod, - CcvTimeoutPeriod: params.CcvTimeoutPeriod, - TransferTimeoutPeriod: params.TransferTimeoutPeriod, - ConsumerRedistributionFraction: params.ConsumerRedistributionFraction, - BlocksPerDistributionTransmission: params.BlocksPerDistributionTransmission, - HistoricalEntries: params.HistoricalEntries, - DistributionTransmissionChannel: action.DistributionChannel, + var initParams *types.ConsumerInitializationParameters + if action.InitParams != nil { + spawnTime := tr.testConfig.containerConfig.Now.Add(time.Duration(action.InitParams.SpawnTime) * time.Millisecond) + params := ccvtypes.DefaultParams() + initParams = &types.ConsumerInitializationParameters{ + InitialHeight: action.InitParams.InitialHeight, + GenesisHash: []byte("gen_hash"), + BinaryHash: []byte("bin_hash"), + SpawnTime: spawnTime, + + UnbondingPeriod: params.UnbondingPeriod, + CcvTimeoutPeriod: params.CcvTimeoutPeriod, + TransferTimeoutPeriod: params.TransferTimeoutPeriod, + ConsumerRedistributionFraction: params.ConsumerRedistributionFraction, + BlocksPerDistributionTransmission: params.BlocksPerDistributionTransmission, + HistoricalEntries: params.HistoricalEntries, + DistributionTransmissionChannel: action.InitParams.DistributionChannel, + } } - - powerShapingParams := types.PowerShapingParameters{ - Top_N: action.TopN, - ValidatorsPowerCap: action.ValidatorsPowerCap, - ValidatorSetCap: action.ValidatorSetCap, - Allowlist: action.Allowlist, - Denylist: action.Denylist, - MinStake: action.MinStake, - AllowInactiveVals: action.AllowInactiveVals, + powerShapingParams := &types.PowerShapingParameters{ + Top_N: action.PowerShapingParams.TopN, + ValidatorsPowerCap: action.PowerShapingParams.ValidatorsPowerCap, + ValidatorSetCap: action.PowerShapingParams.ValidatorSetCap, + Allowlist: action.PowerShapingParams.Allowlist, + Denylist: action.PowerShapingParams.Denylist, + MinStake: action.PowerShapingParams.MinStake, + AllowInactiveVals: action.PowerShapingParams.AllowInactiveVals, } metadata := types.ConsumerMetadata{ @@ -375,7 +380,7 @@ func (tr Chain) createConsumerChain(action CreateConsumerChainAction, verbose bo } // create consumer to get a consumer-id - consumerId := tr.CreateConsumer(providerChainCfg.ChainId, consumerChainCfg.ChainId, action.From, metadata, &initParams, &powerShapingParams) + consumerId := tr.CreateConsumer(providerChainCfg.ChainId, consumerChainCfg.ChainId, action.From, metadata, initParams, powerShapingParams) if verbose { fmt.Println("Created consumer chain", string(consumerChainCfg.ChainId), " with consumer-id", string(consumerId)) } diff --git a/tests/e2e/steps_partial_set_security.go b/tests/e2e/steps_partial_set_security.go index dbe32fc26d..6b23d675c2 100644 --- a/tests/e2e/steps_partial_set_security.go +++ b/tests/e2e/steps_partial_set_security.go @@ -46,9 +46,13 @@ func stepsOptInChain() []Step { Chain: ChainID("provi"), From: ValidatorID("alice"), ConsumerChain: ChainID("consu"), - SpawnTime: uint(time.Minute * 10), // set spawn-time far in the future - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, + InitParams: &InitializationParameters{ + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + SpawnTime: uint(time.Minute * 10), // set spawn-time far in the future + }, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + }, }, State: State{ ChainID("provi"): ChainState{ @@ -119,9 +123,13 @@ func stepsOptInChain() []Step { Chain: ChainID("provi"), From: ValidatorID("alice"), ConsumerChain: ChainID("consu"), - SpawnTime: 0, // launch now - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, + InitParams: &InitializationParameters{ + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + SpawnTime: 0, // launch now + }, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + }, }, State: State{}, }, @@ -1031,13 +1039,17 @@ func stepsValidatorSetCappedChain() []Step { }, { Action: CreateConsumerChainAction{ - Chain: ChainID("provi"), - From: ValidatorID("alice"), - ConsumerChain: ChainID("consu"), - SpawnTime: uint(time.Minute * 10), // set spawn-time far in the future - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, - ValidatorSetCap: 2, + Chain: ChainID("provi"), + From: ValidatorID("alice"), + ConsumerChain: ChainID("consu"), + InitParams: &InitializationParameters{ + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + SpawnTime: uint(time.Minute * 10), // set spawn-time far in the future + }, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + ValidatorSetCap: 2, + }, }, State: State{ ChainID("provi"): ChainState{ @@ -1108,13 +1120,17 @@ func stepsValidatorSetCappedChain() []Step { { // Update with SpawnTime 0 will trigger launch of consumer chain Action: UpdateConsumerChainAction{ - Chain: ChainID("provi"), - From: ValidatorID("alice"), - ConsumerChain: ChainID("consu"), - SpawnTime: 0, // launch now - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, - ValidatorSetCap: 2, + Chain: ChainID("provi"), + From: ValidatorID("alice"), + ConsumerChain: ChainID("consu"), + InitParams: &InitializationParameters{ + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + SpawnTime: 0, // launch now + }, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + ValidatorSetCap: 2, + }, }, State: State{}, }, @@ -1472,9 +1488,13 @@ func stepsValidatorsAllowlistedChain() []Step { Chain: ChainID("provi"), From: ValidatorID("alice"), ConsumerChain: ChainID("consu"), - SpawnTime: uint(time.Minute * 10), // set spawn-time far in the future - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, + InitParams: &InitializationParameters{ + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + SpawnTime: uint(time.Minute * 10), // set spawn-time far in the future + }, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + }, }, State: State{ ChainID("provi"): ChainState{ @@ -1547,13 +1567,17 @@ func stepsValidatorsAllowlistedChain() []Step { Chain: ChainID("provi"), From: ValidatorID("alice"), ConsumerChain: ChainID("consu"), - SpawnTime: 0, // launch now - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, - // only "alice" and "bob" are allowlisted (see `getDefaultValidators` in `tests/e2e/config.go`) - Allowlist: []string{ - "cosmosvalcons1qmq08eruchr5sf5s3rwz7djpr5a25f7xw4mceq", - "cosmosvalcons1nx7n5uh0ztxsynn4sje6eyq2ud6rc6klc96w39", + InitParams: &InitializationParameters{ + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + SpawnTime: 0, // launch now + }, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + // only "alice" and "bob" are allowlisted (see `getDefaultValidators` in `tests/e2e/config.go`) + Allowlist: []string{ + "cosmosvalcons1qmq08eruchr5sf5s3rwz7djpr5a25f7xw4mceq", + "cosmosvalcons1nx7n5uh0ztxsynn4sje6eyq2ud6rc6klc96w39", + }, }, }, State: State{}, @@ -1652,13 +1676,17 @@ func stepsValidatorsDenylistedChain() []Step { }, { Action: CreateConsumerChainAction{ - Chain: ChainID("provi"), - From: ValidatorID("alice"), - ConsumerChain: ChainID("consu"), - SpawnTime: uint(time.Minute * 10), // set spawn-time far in the future - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, - ValidatorSetCap: 2, + Chain: ChainID("provi"), + From: ValidatorID("alice"), + ConsumerChain: ChainID("consu"), + InitParams: &InitializationParameters{ + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + SpawnTime: uint(time.Minute * 10), // set spawn-time far in the future + }, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + ValidatorSetCap: 2, + }, }, State: State{ ChainID("provi"): ChainState{ @@ -1731,10 +1759,14 @@ func stepsValidatorsDenylistedChain() []Step { Chain: ChainID("provi"), From: ValidatorID("alice"), ConsumerChain: ChainID("consu"), - SpawnTime: 0, // launch now - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, - Denylist: []string{"cosmosvalcons1nx7n5uh0ztxsynn4sje6eyq2ud6rc6klc96w39"}, + InitParams: &InitializationParameters{ + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + SpawnTime: 0, // launch now + }, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + Denylist: []string{"cosmosvalcons1nx7n5uh0ztxsynn4sje6eyq2ud6rc6klc96w39"}, + }, }, State: State{}, }, @@ -1836,9 +1868,13 @@ func stepsModifyChain() []Step { Chain: ChainID("provi"), From: ValidatorID("alice"), ConsumerChain: ChainID("consu"), - SpawnTime: uint(time.Minute * 10), // set spawn-time far in the future - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, + InitParams: &InitializationParameters{ + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + SpawnTime: uint(time.Minute * 10), // set spawn-time far in the future + }, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + }, }, State: State{ ChainID("provi"): ChainState{ @@ -1911,9 +1947,13 @@ func stepsModifyChain() []Step { Chain: ChainID("provi"), From: ValidatorID("alice"), ConsumerChain: ChainID("consu"), - SpawnTime: 0, // launch now - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, + InitParams: &InitializationParameters{ + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + SpawnTime: 0, // launch now + }, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + }, }, State: State{}, }, @@ -1992,13 +2032,14 @@ func stepsModifyChain() []Step { // 1. set `ValidatorsPowerCap` to 40% { Action: UpdateConsumerChainAction{ - Chain: ChainID("provi"), - From: ValidatorID("alice"), - ConsumerChain: ChainID("consu"), - SpawnTime: 0, - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, - ValidatorsPowerCap: 40, + Chain: ChainID("provi"), + From: ValidatorID("alice"), + ConsumerChain: ChainID("consu"), + InitParams: nil, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + ValidatorsPowerCap: 40, + }, }, State: State{}, }, @@ -2031,13 +2072,14 @@ func stepsModifyChain() []Step { // 2. set the `ValidatorSetCap` to a maximum of 2 validators { Action: UpdateConsumerChainAction{ - Chain: ChainID("provi"), - From: ValidatorID("alice"), - ConsumerChain: ChainID("consu"), - SpawnTime: 0, - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, - ValidatorSetCap: 2, + Chain: ChainID("provi"), + From: ValidatorID("alice"), + ConsumerChain: ChainID("consu"), + InitParams: nil, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + ValidatorSetCap: 2, + }, }, State: State{}, }, @@ -2073,12 +2115,13 @@ func stepsModifyChain() []Step { Chain: ChainID("provi"), From: ValidatorID("alice"), ConsumerChain: ChainID("consu"), - SpawnTime: 0, - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, - Allowlist: []string{ - "cosmosvalcons1qmq08eruchr5sf5s3rwz7djpr5a25f7xw4mceq", - "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6", + InitParams: nil, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + Allowlist: []string{ + "cosmosvalcons1qmq08eruchr5sf5s3rwz7djpr5a25f7xw4mceq", + "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6", + }, }, }, State: State{}, @@ -2113,11 +2156,12 @@ func stepsModifyChain() []Step { Chain: ChainID("provi"), From: ValidatorID("alice"), ConsumerChain: ChainID("consu"), - SpawnTime: 0, - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, - // only "alice" is denylisted (see `getDefaultValidators` in `tests/e2e/config.go`) - Denylist: []string{"cosmosvalcons1qmq08eruchr5sf5s3rwz7djpr5a25f7xw4mceq"}, + InitParams: nil, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + // only "alice" is denylisted (see `getDefaultValidators` in `tests/e2e/config.go`) + Denylist: []string{"cosmosvalcons1qmq08eruchr5sf5s3rwz7djpr5a25f7xw4mceq"}, + }, }, State: State{}, }, @@ -2153,9 +2197,10 @@ func stepsModifyChain() []Step { From: ValidatorID("alice"), ConsumerChain: ChainID("consu"), NewOwner: "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn", - SpawnTime: 0, - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, + InitParams: nil, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + }, }, State: State{}, }, diff --git a/tests/e2e/steps_permissionless_ics.go b/tests/e2e/steps_permissionless_ics.go index 92ed4dcfed..b7fc01b18e 100644 --- a/tests/e2e/steps_permissionless_ics.go +++ b/tests/e2e/steps_permissionless_ics.go @@ -45,9 +45,13 @@ func stepsPermissionlessICS() []Step { Chain: ChainID("provi"), From: ValidatorID("alice"), ConsumerChain: ChainID("cons2"), // test chain "cons2" is configured with ChainID "consu" - SpawnTime: uint(time.Minute * 3), - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, + InitParams: &InitializationParameters{ + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + SpawnTime: uint(time.Minute * 3), + }, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + }, }, State: State{}, }, @@ -163,9 +167,13 @@ func stepsPermissionlessICS() []Step { From: ValidatorID("bob"), ConsumerChain: ChainID("cons1"), NewOwner: getDefaultValidators()[ValidatorID("carol")].ValconsAddress, - SpawnTime: 0, // launch now - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, + InitParams: &InitializationParameters{ + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + SpawnTime: 0, // launch now + }, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + }, }, State: State{}, }, @@ -174,11 +182,15 @@ func stepsPermissionlessICS() []Step { Chain: ChainID("provi"), From: ValidatorID("carol"), ConsumerChain: ChainID("cons1"), - SpawnTime: 0, - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, - Allowlist: []string{getDefaultValidators()[ValidatorID("carol")].ValconsAddress}, - Denylist: []string{getDefaultValidators()[ValidatorID("bob")].ValconsAddress}, + InitParams: &InitializationParameters{ + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + SpawnTime: 0, + }, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + Allowlist: []string{getDefaultValidators()[ValidatorID("carol")].ValconsAddress}, + Denylist: []string{getDefaultValidators()[ValidatorID("bob")].ValconsAddress}, + }, }, State: State{}, }, diff --git a/tests/e2e/steps_start_chains.go b/tests/e2e/steps_start_chains.go index 7f84d5fa37..6bdc962014 100644 --- a/tests/e2e/steps_start_chains.go +++ b/tests/e2e/steps_start_chains.go @@ -39,9 +39,13 @@ func stepsStartPermissionlessChain(consumerName, consumerChainId string, propose Chain: ChainID("provi"), From: ValidatorID("alice"), ConsumerChain: ChainID(consumerName), - SpawnTime: uint(time.Minute * 3), - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, + InitParams: &InitializationParameters{ + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + SpawnTime: uint(time.Minute * 3), + }, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + }, }, State: State{ ChainID("provi"): e2e.ChainState{ @@ -102,9 +106,13 @@ func stepsStartPermissionlessChain(consumerName, consumerChainId string, propose Chain: ChainID("provi"), From: ValidatorID("alice"), ConsumerChain: ChainID(consumerName), - SpawnTime: 0, // launch now - InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, - TopN: 0, + InitParams: &InitializationParameters{ + InitialHeight: clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}, + SpawnTime: 0, // launch now + }, + PowerShapingParams: &PowerShapingParameters{ + TopN: 0, + }, }, State: State{}, }