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

Merged

Conversation

cmichi
Copy link
Contributor

@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
Contributor 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
Contributor Author

cmichi commented Jan 8, 2025

/cmd prdoc --audience runtime_dev --bump major

Copy link
Contributor

github-actions bot commented Jan 8, 2025

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

@cmichi
Copy link
Contributor 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
Contributor

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
Contributor

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
@github-actions github-actions bot requested a review from athei January 15, 2025 11:14
@athei athei added this pull request to the merge queue Jan 15, 2025
Merged via the queue into paritytech:master with commit 88f898e Jan 15, 2025
193 of 206 checks passed
ordian added a commit that referenced this pull request Jan 16, 2025
* master: (33 commits)
  Implement `pallet-asset-rewards` (#3926)
  [pallet-revive] Add host function `to_account_id` (#7091)
  [pallet-revive] Remove revive events (#7164)
  [pallet-revive] Remove debug buffer (#7163)
  litep2p: Provide partial results to speedup GetRecord queries (#7099)
  [pallet-revive] Bump asset-hub westend spec version (#7176)
  Remove 0 as a special case in gas/storage meters (#6890)
  [pallet-revive] Fix `caller_is_root` return value (#7086)
  req-resp/litep2p: Reject inbound requests from banned peers (#7158)
  Add "run to block" tools (#7109)
  Fix reversed error message in DispatchInfo (#7170)
  approval-voting: Make importing of duplicate assignment idempotent (#6971)
  Parachains: Use relay chain slot for velocity measurement (#6825)
  PRDOC: Document `validate: false` (#7117)
  xcm: convert properly assets in xcmpayment apis (#7134)
  CI: Only format umbrella crate during umbrella check (#7139)
  approval-voting: Fix sending of assignments after restart (#6973)
  Retry approval on availability failure if the check is still needed (#6807)
  [pallet-revive-eth-rpc] persist eth transaction hash (#6836)
  litep2p: Sufix litep2p to the identify agent version for visibility (#7133)
  ...
Nathy-bajo pushed a commit to Nathy-bajo/polkadot-sdk that referenced this pull request Jan 21, 2025
Closes paritytech#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.

---------

Co-authored-by: Cyrill Leutwiler <[email protected]>
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