Code Monkey home page Code Monkey logo

Comments (4)

asalzmann avatar asalzmann commented on August 30, 2024 1

Got it, I appreciate the quick response!

A few other discrepancies I noticed. From the integration docs

// Initialize the packet forward middleware Keeper
// It's important to note that the PFM Keeper must be initialized before the Transfer Keeper
app.PacketForwardKeeper = packetforwardkeeper.NewKeeper(
    appCodec,
    keys[packetforwardtypes.StoreKey],
    app.GetSubspace(packetforwardtypes.ModuleName),
    app.TransferKeeper, // will be zero-value here, reference is set later on with SetTransferKeeper.
    app.IBCKeeper.ChannelKeeper,
    appKeepers.DistrKeeper,
    app.BankKeeper,
    app.IBCKeeper.ChannelKeeper,
)

(1) app.GetSubspace in the integration docs but not the code
(2) authority is not in the integration docs, but is in the code

Code for reference

// NewKeeper creates a new forward Keeper instance
func NewKeeper(
	cdc codec.BinaryCodec,
	key storetypes.StoreKey,
	transferKeeper types.TransferKeeper,
	channelKeeper types.ChannelKeeper,
	distrKeeper types.DistributionKeeper,
	bankKeeper types.BankKeeper,
	ics4Wrapper porttypes.ICS4Wrapper,
	authority string,
) *Keeper {
	return &Keeper{
		cdc:            cdc,
		storeKey:       key,
		transferKeeper: transferKeeper,
		channelKeeper:  channelKeeper,
		distrKeeper:    distrKeeper,
		bankKeeper:     bankKeeper,
		ics4Wrapper:    ics4Wrapper,
		authority:      authority,
	}
}

from ibc-apps.

Reecepbcups avatar Reecepbcups commented on August 30, 2024

@asalzmann This is an SDK v45 -> 46+ store migration requirement (x/params is being removed in SDK v51, so have to migrate before)

Since your chain is already on SDK v47 and you are adding it, you can just set it to nil. Does not apply as there is no migration required

packetforward.NewAppModule(app.PacketForwardKeeper, nil),

Thanks for the callout on this, Ill modify the docs to add clarrification

from ibc-apps.

asalzmann avatar asalzmann commented on August 30, 2024

@Reecepbcups can you weigh in on:

(1) app.GetSubspace in the integration docs but not the code
(2) authority is not in the integration docs, but is in the code

Should we ignore app.GetSubspace and use the x/gov authority?

from ibc-apps.

Reecepbcups avatar Reecepbcups commented on August 30, 2024

@asalzmann

The following changes are pending review & merge here: #147 - this gives the correct documentation

  1. The GetSubspace was removed from the Keeper as it is no longer used within the module (v7.1.x migrates from x/params -> params in the keeper). This was done in #140 since it is ONLY used in the Consensus 1->2 store migration (via packetforward.NewAppModule). SDK v0.51 removes x/params entirely, so we are migrated from it in the release of v7.1.X proactively.

Since stride is just now adding the PFM module, the subspace in packetforward.NewAppModule(app.PacketForwardKeeper, app.GetSubspace(packetforwardtypes.ModuleName)), will never be run since you come in on ConsensusVersion 2. You can use this exactly if you feel more comfortable as outlined in the updated docs PR above :)

  1. Yes, you should use gov as the authority unless you have a DAO/multisig who will handle the params for the module

from ibc-apps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.