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

[pallet-revive] Fix caller_is_root return value #7086

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

cmichi
Copy link

@cmichi cmichi commented Jan 8, 2025

Closes #6767.

The return type of the host function caller_is_root was denoted as u32 in pallet_revive_uapi. This PR fixes the return type to bool.

As a drive-by, the PR re-exports pallet_revive::exec::Origin to extend what can be tested externally.

@cmichi
Copy link
Author

cmichi commented Jan 8, 2025

cc @athei @pgherveou @xermicus

Copy link
Member

@xermicus xermicus left a comment

Choose a reason for hiding this comment

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

Thanks, this seems to be more consistent with other similar API methods.

You'll need to add major prdoc change (I think this constitutes a breaking change even though it only involves unstable methods).

Apparently there are no test fixtures for this.

@cmichi
Copy link
Author

cmichi commented Jan 8, 2025

/cmd prdoc --audience runtime_dev --bump major

Copy link

github-actions bot commented Jan 8, 2025

Sorry, only members of the organization paritytech members can run commands.

@cmichi
Copy link
Author

cmichi commented Jan 8, 2025

@xermicus Can you trigger the command above?

@xermicus
Copy link
Member

xermicus commented Jan 8, 2025

/cmd prdoc --audience runtime_dev --bump major

@xermicus xermicus added T7-smart_contracts This PR/Issue is related to smart contracts. R0-silent Changes should not be mentioned in any release notes labels Jan 8, 2025
Copy link

github-actions bot commented Jan 8, 2025

Command "prdoc --audience runtime_dev --bump major" has failed ❌! See logs here

@xermicus
Copy link
Member

xermicus commented Jan 8, 2025

@cmichi the bot can't push to your branch. Can you add it manually (there is also the parity-prdoc CLI utility)?

Copy link
Member

@athei athei left a comment

Choose a reason for hiding this comment

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

Should be a minor for pallet-revive (exporting a new type) and a major for pallet-revive-uapi. Just copy and edit prdoc stuff from past PRs to this pallet.

@github-actions github-actions bot requested a review from xermicus January 8, 2025 13:58
Copy link

github-actions bot commented Jan 8, 2025

Review required! Latest push from author must always be reviewed

@github-actions github-actions bot requested review from athei and xermicus January 8, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes T7-smart_contracts This PR/Issue is related to smart contracts.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Contracts/Revive: caller_is_root does not return bool
3 participants