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-0196: Migrate Stake to Core BPF #196

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions proposals/0196-migrate-stake-to-core-bpf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
simd: '0196'
title: Migrate Stake to Core BPF
authors:
- Hanako Mumei
category: Standard
type: Core
status: Review
created: 2024-11-14
feature: (fill in with feature tracking issues once accepted)
---

## Summary

Migrate the Stake program to Core BPF.

## Motivation

BPF programs offer less complexity than native programs for other clients, such
as Firedancer, since developers will no longer have to keep up with program
changes in their runtime implementations. Instead, the program can just be
updated once.

In this spirit, the Stake program should be migrated to Core BPF.

## Alternatives Considered

The Stake program could instead remain a builtin program. This would mean each
validator client implementation would have to build and maintain this program
alongside their runtime, including any future changes.

## New Terminology

N/A.

## Detailed Design

The Stake program will be reimplemented in order to be compiled to BPF and
executed by the BPF loader.

The reimplemented program's ABI will exactly match that of the original.

The reimplemented program's functionality will exactly match that of the
original, differing only in compute usage. Instead it will have dynamic compute
usage based on the VM's compute unit meter.

The program will be migrated to Core BPF using the procedure outlined in
[SIMD 0088](./0088-enable-core-bpf-programs.md).

The program will have no upgrade authority. If changes are required, for
essential network operations, the program will be updated using feature-gates.

## Impact

Validator client teams are no longer required to implement and maintain the
Stake program within their runtime.

All validator client teams can work to maintain the single Stake program
together.

## Security Considerations

The program's reimplementation poses no new security considerations compared to
the original builtin version.

The greatest security concern is a mistake in the reimplementation.

## Backwards Compatibility

The Core BPF implementation is 100% backwards compatible with the original
builtin implementation.
Loading