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

feat: PrevRealm ignores user realms in MsgRun #1719

Merged
merged 7 commits into from
May 23, 2024

Conversation

tbruyelle
Copy link
Contributor

Fix #1664

As commented in the IsRealm() method, a better format of user realms should emerge in the form of gno.land/u/user_address, which would remove the confusion between standard realms and the realm forged under the MsgRun transaction.

BREAKING CHANGE: std.PrevRealm is not returning the user realm any more when invoked under a transaction broadcasted by MsgRun.

To run the txtar test:

$ go test ./gno.land/cmd/gnoland/ -v -run TestTestdata/prevrealm
Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

Fix gnolang#1664

As commented in the IsRealm() method, a better format of user realms
should emerge in the form of `gno.land/u/user_address`, which would
remove the confusion between standard realms and the realm forged under
the MsgRun transaction.
@github-actions github-actions bot added 📦 🤖 gnovm Issues or PRs gnovm related 📦 ⛰️ gno.land Issues or PRs gno.land package related labels Mar 1, 2024
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 49.01%. Comparing base (e1586a5) to head (89f6938).

Files Patch % Lines
gno.land/pkg/sdk/vm/keeper.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1719   +/-   ##
=======================================
  Coverage   49.01%   49.01%           
=======================================
  Files         576      576           
  Lines       77604    77605    +1     
=======================================
+ Hits        38035    38036    +1     
- Misses      36486    36487    +1     
+ Partials     3083     3082    -1     
Flag Coverage Δ
gno.land 61.69% <0.00%> (ø)
gnovm 41.94% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

gnovm/pkg/gnolang/values.go Outdated Show resolved Hide resolved
@tbruyelle tbruyelle requested a review from a team as a code owner April 22, 2024 19:19
@leohhhn leohhhn changed the title feat: PrevRealm ignores user realms feat: PrevRealm ignores user realms in MsgRun Apr 25, 2024
@leohhhn
Copy link
Contributor

leohhhn commented Apr 25, 2024

@tbruyelle If I understand correctly, this only modifies the PrevRealm in case of MsgRun? If so, I changed the name of the PR to make it more clear

@tbruyelle
Copy link
Contributor Author

@tbruyelle If I understand correctly, this only modifies the PrevRealm in case of MsgRun? If so, I changed the name of the PR to make it more clear

Yes, this is exactly that, thanks for the clarification.

@zivkovicmilos zivkovicmilos added the breaking change Functionality that contains breaking changes label May 15, 2024
@tbruyelle tbruyelle requested review from deelawn, gfanton and a team as code owners May 15, 2024 13:02
Copy link
Member

@thehowl thehowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good.

gno.land/cmd/gnoland/testdata/prevrealm.txtar Outdated Show resolved Hide resolved
gnovm/pkg/gnolang/realm.go Show resolved Hide resolved
@thehowl thehowl merged commit f165df7 into gnolang:master May 23, 2024
48 of 49 checks passed
@tbruyelle tbruyelle deleted the tbruyelle/feat/prevrealm-call-run branch May 23, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Functionality that contains breaking changes 📦 ⛰️ gno.land Issues or PRs gno.land package related 📦 🤖 gnovm Issues or PRs gnovm related
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

feat: PrevRealm has the same behavior between MsgRun and MsgCall
4 participants