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

Contracts Add new version for marking new stable API #3415

Merged
merged 4 commits into from
Feb 23, 2024
Merged

Conversation

pgherveou
Copy link
Contributor

@pgherveou pgherveou commented Feb 21, 2024

Add a ApiVersion constant to the pallet-contracts Config to communicate with developers the current state of the host functions exposed by the pallet

@pgherveou pgherveou marked this pull request as ready for review February 23, 2024 09:41
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-clippy
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5321349

@pgherveou pgherveou added the T7-smart_contracts This PR/Issue is related to smart contracts. label Feb 23, 2024
/// Defines the current version of the HostFn APIs.
/// This is used to communicate the available APIs in pallet-contracts.
///
/// The version is bumped any time a new HostFn is added or stabilized.
Copy link

Choose a reason for hiding this comment

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

I'm thinking about if we're better off using more general semantics here. Something like impl_version that we generally increment every time a host fn is added/stabilized, but also every time we want to communicate some other change, like an important bug fix.

Copy link
Member

@athei athei Feb 23, 2024

Choose a reason for hiding this comment

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

I think this will be difficult to do with a linear numbers. Bugfixes will get backported and then this system will fall apart.

/// Defines the current version of the HostFn APIs.
/// This is used to communicate the available APIs in pallet-contracts.
///
/// The version is bumped any time a new HostFn is added or stabilized.
Copy link
Member

@athei athei Feb 23, 2024

Choose a reason for hiding this comment

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

I think this will be difficult to do with a linear numbers. Bugfixes will get backported and then this system will fall apart.

@pgherveou pgherveou added this pull request to the merge queue Feb 23, 2024
Merged via the queue into master with commit f2645ee Feb 23, 2024
134 of 136 checks passed
@pgherveou pgherveou deleted the pg/add-version branch February 23, 2024 13:33
EgorPopelyaev pushed a commit that referenced this pull request Feb 26, 2024
Add a `ApiVersion` constant to the pallet-contracts Config to
communicate with developers the current state of the host functions
exposed by the pallet
bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this pull request Mar 25, 2024
Add a `ApiVersion` constant to the pallet-contracts Config to
communicate with developers the current state of the host functions
exposed by the pallet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T7-smart_contracts This PR/Issue is related to smart contracts.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants