diff --git a/app/provider/app.go b/app/provider/app.go index 8de3d014bf..3d546c8899 100644 --- a/app/provider/app.go +++ b/app/provider/app.go @@ -277,11 +277,6 @@ func New( consensusparamtypes.StoreKey, ) - // register streaming services - if err := bApp.RegisterStreamingServices(appOpts, keys); err != nil { - panic(err) - } - tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey) memKeys := storetypes.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) @@ -311,7 +306,6 @@ func New( authtypes.NewModuleAddress(govtypes.ModuleName).String(), runtime.EventService{}, ) - bApp.SetParamStore(&app.ConsensusParamsKeeper.ParamsStore) // add capability keeper and ScopeToModule for ibc module @@ -576,8 +570,8 @@ func New( crisistypes.ModuleName, govtypes.ModuleName, stakingtypes.ModuleName, - ibctransfertypes.ModuleName, ibcexported.ModuleName, + ibctransfertypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, @@ -592,18 +586,18 @@ func New( app.MM.SetOrderEndBlockers( crisistypes.ModuleName, + authtypes.ModuleName, govtypes.ModuleName, + capabilitytypes.ModuleName, + evidencetypes.ModuleName, stakingtypes.ModuleName, - ibctransfertypes.ModuleName, ibcexported.ModuleName, - capabilitytypes.ModuleName, - authtypes.ModuleName, + ibctransfertypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName, minttypes.ModuleName, genutiltypes.ModuleName, - evidencetypes.ModuleName, paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, @@ -617,6 +611,7 @@ func New( // so that other modules that want to create or claim capabilities afterwards in InitChain // can do so safely. app.MM.SetOrderInitGenesis( + genutiltypes.ModuleName, capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, @@ -626,10 +621,9 @@ func New( govtypes.ModuleName, minttypes.ModuleName, crisistypes.ModuleName, - ibcexported.ModuleName, evidencetypes.ModuleName, + ibcexported.ModuleName, ibctransfertypes.ModuleName, - genutiltypes.ModuleName, paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, diff --git a/tests/integration/normal_operations.go b/tests/integration/normal_operations.go index cd8e07f323..bc9fc5eaa0 100644 --- a/tests/integration/normal_operations.go +++ b/tests/integration/normal_operations.go @@ -1,6 +1,8 @@ package integration import ( + "fmt" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" @@ -18,6 +20,7 @@ func (k CCVTestSuite) TestHistoricalInfo() { //nolint:govet // this is a test so initValsetLen := len(consumerKeeper.GetAllCCValidator(cCtx())) // save current block height initHeight := cCtx().BlockHeight() + fmt.Println("### AFTER SETUP ###") // define an utility function that creates a new cross-chain validator // and then call track historical info in the next block diff --git a/tests/integration/setup.go b/tests/integration/setup.go index ac4c639d2c..b4424b73de 100644 --- a/tests/integration/setup.go +++ b/tests/integration/setup.go @@ -93,7 +93,7 @@ func NewCCVTestSuite[Tp testutil.ProviderApp, Tc testutil.ConsumerApp]( // Add provider to coordinator, store returned test chain and app. // Concrete provider app type is passed to the generic function here. provider, providerApp := icstestingutils.AddProvider[Tp](t, coordinator, providerAppIniter) - + fmt.Println("------ provider added ----------") // Pass variables to suite. return coordinator, provider, providerApp } @@ -103,6 +103,7 @@ func NewCCVTestSuite[Tp testutil.ProviderApp, Tc testutil.ConsumerApp]( coordinator *ibctesting.Coordinator, index int, ) *icstestingutils.ConsumerBundle { + fmt.Println("------ adding consumer ----------") return icstestingutils.AddConsumer[Tp, Tc](coordinator, s, index, consumerAppIniter) } @@ -163,6 +164,7 @@ func (suite *CCVTestSuite) SetupTest() { err = bundle.Path.EndpointA.UpdateClient() suite.Require().NoError(err) } + fmt.Println("## REACHED END ---") } func (s *CCVTestSuite) registerPacketSniffer(chain *ibctesting.TestChain) { @@ -395,6 +397,7 @@ func (ps *packetSniffer) ListenFinalizeBlock(ctx context.Context, req abci.Reque // TODO: @MSalopek this was deprecated, figure out how to use it packets := ParsePacketsFromEvents(res.GetEvents()) for _, packet := range packets { + fmt.Println("#----------- packet --------------- #", packet) ps.packets[getSentPacketKey(packet.Sequence, packet.SourceChannel)] = packet } return nil @@ -407,6 +410,7 @@ func getSentPacketKey(sequence uint64, channelID string) string { } func (*packetSniffer) ListenCommit(ctx context.Context, res abci.ResponseCommit, cs []*store.StoreKVPair) error { + fmt.Println("# HAVE A COMMIT ##", res) return nil } diff --git a/testutil/ibc_testing/generic_setup.go b/testutil/ibc_testing/generic_setup.go index ab52cdba3f..e5c58ecffe 100644 --- a/testutil/ibc_testing/generic_setup.go +++ b/testutil/ibc_testing/generic_setup.go @@ -70,6 +70,7 @@ func AddProvider[T testutil.ProviderApp](t *testing.T, coordinator *ibctesting.C ibctesting.DefaultTestingAppInit = appIniter provider := ibctesting.NewTestChain(t, coordinator, provChainID) coordinator.Chains[provChainID] = provider + fmt.Println("### PROVI BLOCK", coordinator.Chains[provChainID].GetContext().BlockHeight()) providerToReturn, ok := provider.App.(T) if !ok { @@ -131,6 +132,7 @@ func AddConsumer[Tp testutil.ProviderApp, Tc testutil.ConsumerApp]( providerChain.GetContext(), prop, ) + fmt.Println("### ERRORED ON CREATE #####", err) s.Require().NoError(err) // commit the state on the provider chain diff --git a/testutil/ibc_testing/specific_setup.go b/testutil/ibc_testing/specific_setup.go index f128f3c2fb..cecb2ae6d1 100644 --- a/testutil/ibc_testing/specific_setup.go +++ b/testutil/ibc_testing/specific_setup.go @@ -6,6 +6,7 @@ package ibc_testing import ( "encoding/json" + "fmt" db "github.com/cosmos/cosmos-db" ibctesting "github.com/cosmos/ibc-go/v8/testing" @@ -34,6 +35,7 @@ var ( func ProviderAppIniter() (ibctesting.TestingApp, map[string]json.RawMessage) { encoding := appProvider.MakeTestEncodingConfig() testApp := appProvider.New(log.NewNopLogger(), db.NewMemDB(), nil, true, simtestutil.EmptyAppOptions{}) + fmt.Println("$$$$ ProviderAppIniter done") return testApp, appProvider.NewDefaultGenesisState(encoding.Codec) } @@ -43,7 +45,7 @@ func ConsumerAppIniter(initValPowers []types.ValidatorUpdate) AppIniter { encoding := appConsumer.MakeTestEncodingConfig() testApp := appConsumer.New(log.NewNopLogger(), db.NewMemDB(), nil, true, simtestutil.EmptyAppOptions{}) genesisState := appConsumer.NewDefaultGenesisState(encoding.Codec) - // NOTE ibc-go/v7/testing.SetupWithGenesisValSet requires a staking module + // NOTE: starting from ibc-go/v7/testing.SetupWithGenesisValSet requires a staking module // genesisState or it panics. Feed a minimum one. genesisState[stakingtypes.ModuleName] = encoding.Codec.MustMarshalJSON( &stakingtypes.GenesisState{ @@ -56,7 +58,7 @@ func ConsumerAppIniter(initValPowers []types.ValidatorUpdate) AppIniter { consumerGenesis.InitialValSet = initValPowers consumerGenesis.Params.Enabled = true genesisState[consumertypes.ModuleName] = encoding.Codec.MustMarshalJSON(&consumerGenesis) - + fmt.Println("$$$$ ConsumerAppIniter done") return testApp, genesisState } } diff --git a/x/ccv/provider/keeper/proposal.go b/x/ccv/provider/keeper/proposal.go index a1e1242e7a..1b75101a32 100644 --- a/x/ccv/provider/keeper/proposal.go +++ b/x/ccv/provider/keeper/proposal.go @@ -77,6 +77,7 @@ func (k Keeper) CreateConsumerClient(ctx sdk.Context, prop *types.ConsumerAdditi clientState.UnbondingPeriod = consumerUnbondingPeriod consumerGen, validatorSetHash, err := k.MakeConsumerGenesis(ctx, prop) + fmt.Println("## ERRORS IN PROPOSAL ###", err) if err != nil { return err } @@ -246,6 +247,7 @@ func (k Keeper) MakeConsumerGenesis( return gen, nil, errorsmod.Wrapf(types.ErrNoUnbondingTime, "ubonding time not found: %s", err) } height := clienttypes.GetSelfHeight(ctx) + fmt.Println("## PROVIDER HEIGHT at MakeConsumerGenesis", height) clientState := k.GetTemplateClient(ctx) // this is the counter party chain ID for the consumer @@ -261,6 +263,7 @@ func (k Keeper) MakeConsumerGenesis( clientState.UnbondingPeriod = providerUnbondingPeriod consState, err := k.clientKeeper.GetSelfConsensusState(ctx, height) + fmt.Println("! NO CONSENSUS STATE !", err) if err != nil { return gen, nil, errorsmod.Wrapf(clienttypes.ErrConsensusStateNotFound, "error %s getting self consensus state for: %s", err, height) }