-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Bug]: unable to add ConsensusParams into ctx within the same block execution containing migration #16494
Comments
interesting, thanks for the report. We will look into this, this week |
Thanks, but we might close this issue now, since I see main branch move to context.Context, I thought we might change to *ctx but that's super breaking api change. |
if there's a solution in main branch, can we port to 0.47? |
Since main branch already use context.Context, I guess we could use consensusParamsKeeper 1st? |
there are logics in sdk that rely on |
i think we will need a way to continue getting it from context. |
If Consensus Params are needed on the |
The problem here is it's to be migrated, so it don't exists before upgrade module migrate it |
Not sure if there's better way to allow other modules access updated ctx right after migrate without changing BeginBlock signature |
I guess we should just run migration before everything else, under a minimal context, a special hook just for that, before the BeginBlocker. |
Do you mean sth like this, test pass but I can't find v0.48.x to based on since it's consensus breaking change. |
I cleanup a bit rebase from main now, but might need manual backport later. |
@mmsqe @tac0turtle @yihuang i see some fixes for this, but none of them in 0.47.x, what is the way to fix this in 0.47.x? |
the correct fix would be to query the parameters from the consensus module itself instead of using context.ConsensusParams. That should suffice |
thanks! i misunderstood somehow from discussion above that was not enough, but it seems ok |
Summary of Bug
Manager cannot add ConsensusParams into ctx after calling BeginBlock of UpgradeModule. Since only ctx doesn't refresh after upgrade module, other modules within for loop can't not access consensus params.
Version
v0.47.3
Steps to Reproduce
Other module like feemarket get empty consensus params in BeginBlock, a workaround is to call consensusParamsKeeper to get from store but not a longterm solution.
The text was updated successfully, but these errors were encountered: