Skip to content

Commit

Permalink
attempting to bring back old + migration, no work
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed May 6, 2024
1 parent 7833f7a commit 9bd13ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 29 deletions.
17 changes: 3 additions & 14 deletions chain/cosmos/cosmos_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import (
)

var (
DefaultProviderUnbondingPeriod = 336 * time.Hour
DefaultProviderUnbondingPeriod = 504 * time.Hour
defaultUpgradePath = []string{"upgrade", "upgradedIBCState"}
)

Expand Down Expand Up @@ -1109,8 +1109,8 @@ func (c *CosmosChain) StartProvider(testName string, ctx context.Context, additi

// TODO fetch or default variables
BlocksPerDistributionTransmission: 1000,
CcvTimeoutPeriod: 2419200000000000,
TransferTimeoutPeriod: 3600000000000,
CcvTimeoutPeriod: trustingPeriod * 2,
TransferTimeoutPeriod: trustingPeriod,
ConsumerRedistributionFraction: "0.75",
HistoricalEntries: 10000,
UnbondingPeriod: trustingPeriod,
Expand Down Expand Up @@ -1283,17 +1283,6 @@ func (c *CosmosChain) StartConsumer(testName string, ctx context.Context, additi
return err
}

// ccvStateMarshaled, _, err := c.Provider.GetNode().ExecQuery(ctx, "provider", "consumer-genesis", c.cfg.ChainID)
// if err != nil {
// return fmt.Errorf("failed to query provider for ccv state: %w", err)
// }
// c.log.Info("BEFORE MIGRATION!", zap.String("GEN", string(ccvStateMarshaled)))

// populate genesis file ccvconsumer module app_state.
// fetch provider latest block (timestamp, root.hash, and next_validators_hash) to populate provider_consensus_state
// populate provider_client_state with trusting and unbonding periods, latest_height.revision_height of height which is used for consensus state
// populate initial_val_set with provider val pubkeys and power

nextValidatorsHash := block.Block.NextValidatorsHash
timestamp := block.Block.Time
rootHash := block.Block.AppHash
Expand Down
18 changes: 3 additions & 15 deletions examples/ibc/ics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,12 @@ func TestICS(t *testing.T) {
{
Name: "ics-provider", Version: "v3.3.0",
NumValidators: &vals, NumFullNodes: &fNodes,
ChainConfig: ibc.ChainConfig{GasAdjustment: 1.5, ChainID: providerChainID},
ChainConfig: ibc.ChainConfig{GasAdjustment: 1.5, ChainID: providerChainID, TrustingPeriod: "336h"},
},
{
Name: "ics-consumer", Version: "v3.3.0",
Name: "ics-consumer", Version: "v3.1.0",
NumValidators: &vals, NumFullNodes: &fNodes,
ChainConfig: ibc.ChainConfig{GasAdjustment: 1.5, ChainID: "consumer-1"}, /*
InterchainSecurityConfig: ibc.ICSConfig{
ProviderVerOverride: "v3.3.0",
ConsumerVerOverride: "v3.3.0",
},
*/

ChainConfig: ibc.ChainConfig{GasAdjustment: 1.5, ChainID: "consumer-1"},
},
})

Expand All @@ -69,12 +63,6 @@ func TestICS(t *testing.T) {
AddChain(provider).
AddChain(consumer).
AddRelayer(r, "relayer").
// AddLink(interchaintest.InterchainLink{
// Chain1: provider, // this should be done automatically yea?
// Chain2: consumer,
// Relayer: r,
// Path: "ibc-path",
// }).
AddProviderConsumerLink(interchaintest.ProviderConsumerLink{
Provider: provider,
Consumer: consumer,
Expand Down

0 comments on commit 9bd13ca

Please sign in to comment.