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

Missing RPC method offchain_localStorageClear #7265

Closed
2 tasks done
khssnv opened this issue Jan 20, 2025 · 0 comments · Fixed by #7266
Closed
2 tasks done

Missing RPC method offchain_localStorageClear #7265

khssnv opened this issue Jan 20, 2025 · 0 comments · Fixed by #7266
Labels
I5-enhancement An additional feature request. I10-unconfirmed Issue might be valid, but it's not yet known.

Comments

@khssnv
Copy link
Contributor

khssnv commented Jan 20, 2025

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Motivation

Substrate off-chain RPC API offers offchain_localStorageSet and offchain_localStorageGet methods for writing and reading a certain off-chain storage key. But there are no means to remove a key through the RPC API once a key is set. The existing offchain_localStorageSet accepts Bytes and does not accept None value which makes possible to set the value to zero, but not remove the key.

Request

Add offchain_localStorageClear RPC method.

Solution

Extend rpc-api::offchain::OffchainApiServer trait with clear_local_storage method and implement it for rpc::offchain::Offchain.

Are you willing to help with this request?

Yes!

@khssnv khssnv added the I5-enhancement An additional feature request. label Jan 20, 2025
@github-actions github-actions bot added the I10-unconfirmed Issue might be valid, but it's not yet known. label Jan 20, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 23, 2025
# Description

Closes #7265.

## Integration

Requires changes in
`https://github.com/polkadot-js/api/packages/{rpc-augment,types-support,types}`
to be visible in Polkadot\Substrate Portal and in other libraries where
we should explicitly state RPC methods.

Accompany PR to `polkadot-js/api`:
polkadot-js/api#6070.

## Review Notes

Please put the right label on my PR.

---------

Co-authored-by: command-bot <>
Co-authored-by: Bastian Köcher <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I5-enhancement An additional feature request. I10-unconfirmed Issue might be valid, but it's not yet known.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant