-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat: add retroactive support for core API to 0.45.x #14583
feat: add retroactive support for core API to 0.45.x #14583
Conversation
@aaronc does someone need to take over this? |
That would be ideal |
Can you describe what else needs to be done? |
Testing it with mock modules |
I'm picking this one up 👍 |
@aaronc this is pretty much done, but it lacks the EndBlock and BeginBlock methods. Is that something we should backport too right? |
Yes for sure |
…into aaronc/v0.45.x-core-api-support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a plan to complete the backporting for the full core API service? I.e. begin blockers. Also, is there an example of how a module would use this adapter? e.g. x/bank
Yes, although maybe things like event listeners and inter-module client don't get backported. We'd want to use a module that only uses core API as an example. Maybe x/circuit will? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets add a changelog entry.
We should make it clear in documentation somehow that there will be limits on how much of core API can retroactively be supported. ADR 033 and event listeners obviously no. Also, if we do things with Msg's to remove the bech32 sdk.AccAddress dependency and support protoreflect, there will need to be other backports to 0.45 to support that... or it will just be an unsupported part of core API. |
I think it will be unsupported. There isn't a large need to backport these items, but it's useful. Once we have better docs and people know what's possible then if we get requests to backport them we can evaluate on a per case basis |
Co-authored-by: Facundo Medica <facundomedica@gmail.com>
Co-authored-by: Facundo Medica <facundomedica@gmail.com>
Description
This demonstrates how 0.45.x (or really any older SDK version) could be adapted to support modules written with the core API. This can allow us to write new modules which don't depend on any mainline SDK release (just core) but can be used with any SDK version.
The core API is currently incomplete and doesn't have support for things like registering services, begin/end blockers, events, etc. Those things should also be pretty straightforward to add and hopefully this proof of concept shows how this can work for multi-SDK version compatibility of standalone modules.
There are two parts to this adaptor:
core_module.go
has a functionUseCoreAPIModule
to wrap a core API module as one that v0.45.x understands as anAppModule
core_serices.go
which allows implementing the services core API modules will consume without depending directly onsdk.Context
.Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change