Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic capability key store (ADR / implementation) #5290

Closed
cwgoes opened this issue Nov 8, 2019 · 4 comments · Fixed by #5397
Closed

Dynamic capability key store (ADR / implementation) #5290

cwgoes opened this issue Nov 8, 2019 · 4 comments · Fixed by #5397
Assignees
Labels
S:blocked Status: Blocked T: ADR An issue or PR relating to an architectural decision record

Comments

@cwgoes
Copy link
Contributor

cwgoes commented Nov 8, 2019

Ref #5230 (comment)

Blocks IBC 1.0.0.

Does the SDK have any way of allocating & tracking store keys at runtime (e.g. dynamically)?
It seems like the current mechanism can only handle static allocation (where all store keys are passed to keepers in app.go)
I can envision a mechanism where keepers have a private map of store keys that can be altered at runtime, although some initialisation logic will need to exist to track what store keys need to be passed to keepers when someone starts the chain without syncing from genesis.

ICS 5 needs the ability for capability keys (memory addresses) to be dynamically generated as transactions are processed and to be passed around the state machine - but they cannot be serialised to the public Merkle store since they are memory addresses (will vary per machine, intentional for capability-ness).
Maybe a new abstraction of a "Capability Store" of some sort would help out here, that could keep a public map of identifiers and a private map of memory addresses, and reallocate appropriately on start-up.

@fedekunze fedekunze added T: ADR An issue or PR relating to an architectural decision record x/ibc labels Nov 8, 2019
@fedekunze
Copy link
Collaborator

cc: @alexanderbez @rigelrozanski thoughts?

@jackzampolin
Copy link
Member

This needs an ADR @cwgoes, do you have some time to take up this work?

@cwgoes
Copy link
Contributor Author

cwgoes commented Nov 14, 2019

Yes, although I think it is lower priority than light client work & IBC interface finalisation.

@cwgoes
Copy link
Contributor Author

cwgoes commented Dec 12, 2019

Working on this now. It will be a bit complicated though, we could always elect to just support static ports for the first SDK release of IBC.

If we want examples with e.g. WASM contracts, we pretty much need this, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S:blocked Status: Blocked T: ADR An issue or PR relating to an architectural decision record
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants