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

SIMD-0161: SBPF versioning and feature gating #161

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Lichtso
Copy link

@Lichtso Lichtso commented Jul 26, 2024

No description provided.

@Lichtso Lichtso changed the title SIMD-XXXX: Explicit versioning and feature gating of SBPF programs SIMD-0161: Explicit versioning and feature gating of SBPF programs Jul 26, 2024
@Lichtso Lichtso changed the title SIMD-0161: Explicit versioning and feature gating of SBPF programs SIMD-0161: SBPF versioning and feature gating Jul 26, 2024
Block explorers are recommended to display this SBPF version field for program
accounts.

For each SBPF version two feature gates will control its availability:

Choose a reason for hiding this comment

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

I'm not sure that we need such a strict system. I think we could probably have several versions active and deployable at the same time, without forcing people to update toolchain and redeploy or pay extra costs.

Take the following examples:

  • dynamic frames: from the vm perspective, it is cheaper to use dynamic frames, because programs potentially page in less memory if an X-deep call stack fits in 1 page vs taking X pages because of fixed framing. We might want to push people to update to increase performance.

  • the sub imm operand swap change: this doesn't materially change anything. It's a nice thing for us to fix for aesthetic reasons, but it doesn't really change anything for developers.

I think I'd prefer an ad-hoc system where depending on the impact of a new SBPF version, we decide whether and how to rug earlier versions (in practice I expect this to happen very rarely).

Copy link
Author

Choose a reason for hiding this comment

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

Mandating that all deployments are targeting the newest version does not force anybody to redeploy. It only means that dapp devs have to keep their toolchain updated when they re/deploy. You are right in that it is not necessary to be this strict, but it has the nice effect of allowing us to get more testing exposure for the newest toolchain version.

Comment on lines +69 to +72
| SBPF version | becomes deployable and executable | ceases to be deployable |
| ------------ | --------------------------------- | ----------------------- |
| v1 | | Feature gate A |
| v2 | Feature gate A | Feature gate B |
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this purely an example, or are we considering only one version to be able to deploy at a time? It might be helpful to include the number of simultaneous SBPF versions that the network will allow.

Copy link
Author

Choose a reason for hiding this comment

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

Yes the proposal right now says that there can only be one deployable version at a time (but many executable versions). See the discussion above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants