Skip to content
Open
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
05f5790
feature-gate-threshold-automation init
buffalojoec Oct 12, 2023
c2493f7
bump to 0072
buffalojoec Oct 19, 2023
027c22a
address minor corrections
buffalojoec Oct 19, 2023
61c9f17
revise based on related SIMDs
buffalojoec Dec 15, 2023
49297a3
add garbage collection process
buffalojoec Dec 15, 2023
3ec0b88
add PDA details
buffalojoec Dec 15, 2023
26ce787
revise signal cadence
buffalojoec Dec 15, 2023
f2b796f
add instruction layout example
buffalojoec Dec 15, 2023
af88bfd
add state layout examples
buffalojoec Dec 15, 2023
46556dd
add multi-sig activation gate
buffalojoec Dec 15, 2023
28faf1a
add additional elaboration
buffalojoec Jan 25, 2024
daae4d4
init new version of 0072
buffalojoec Feb 5, 2024
828ecfb
add reusable support signal PDA
buffalojoec Mar 14, 2024
c04c84b
update to use validator epoch stake syscall
buffalojoec Mar 14, 2024
855950a
add updates from SIMD 0133
buffalojoec May 9, 2024
0fb9358
add some context and wording
buffalojoec May 13, 2024
d3ee197
add c struct for PDA layout
buffalojoec May 13, 2024
22cf22a
hard-coded threshold
buffalojoec May 16, 2024
be5cfc4
change deadline to 4500 slots
buffalojoec May 16, 2024
0420825
clarity suggestions
buffalojoec May 22, 2024
93cb9c8
add more program specification
buffalojoec May 22, 2024
92ea03f
one PDA per epoch
buffalojoec Jun 3, 2024
17afcf0
remove slots remaining constraint
buffalojoec Jun 3, 2024
3d3f535
Update proposals/0072-feature-gate-threshold-automation.md
buffalojoec Jun 3, 2024
092439f
instruction clarity
buffalojoec Jun 3, 2024
4b0db19
update `StageFeatureForActivation` instruction
buffalojoec Aug 14, 2024
da715bd
update `SignalSupportForStagedFeatures` instruction
buffalojoec Aug 14, 2024
f7d3420
update runtime step
buffalojoec Aug 14, 2024
ac97130
update state init requirement
buffalojoec Dec 9, 2024
7c33aa3
mark as idea
buffalojoec Dec 9, 2024
76b00f6
update design after discussions with justin
buffalojoec Jan 23, 2025
de04052
may: update v2 state
buffalojoec May 16, 2025
db662d8
may: enhance per-epoch signal cranking
buffalojoec May 16, 2025
e91d7d7
may: batch support signal instructions
buffalojoec May 16, 2025
50f2142
may: add more activation details
buffalojoec May 16, 2025
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
Prev Previous commit
Next Next commit
add reusable support signal PDA
  • Loading branch information
buffalojoec committed May 16, 2025
commit 828ecfb2b7583dffac9930b7a80aa55bf6edef6c
49 changes: 25 additions & 24 deletions proposals/0072-feature-gate-threshold-automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,9 @@ beneficial.
[SIMD 0089](https://github.com/solana-foundation/solana-improvement-documents/pull/89)
that will own all feature accounts.
- **Staged Features PDA:** The PDA under the Feature Gate program used to track
features submitted for activation for a particular epoch.
features submitted for activation.
- **Support Signal PDA:** The PDA under the Feature Gate program used to store
a bit mask of the staged features a node supports.
- **Feature Tombstone:** A static address with no on-chain account for assigning
accounts under, effectively "archiving" them and removing them from the
Feature Gate program's owned accounts.

## Detailed Design

Expand All @@ -61,21 +58,21 @@ The new process is comprised of the following steps:
1. **Feature Creation:** Contributors create feature accounts as they do now.
2. **Staging Features for Activation:** In some epoch N, a multi-signature
authority stages for activation some or all of the features created in step
1.
1, to be activated at the end of the *next epoch*.
3. **Signaling Support for Staged Features:** During the next epoch (epoch N+1),
validators signal which of the staged feature-gates they support in their
software.
4. **Activation and Garbage Collection:** At the end of epoch N+1, the runtime
activates the feature-gates that have the necessary stake support. At the
same time, the runtime also archives activated feature accounts and PDAs no
longer required by the process.
4. **Feature Activation:** At the end of epoch N+1, the runtime activates the
feature-gates that have the required stake support.

### Step 1: Feature Creation

The first step is creation of a feature account, done by submitting a
transaction containing System instructions to fund, allocate, and assign the
feature account to `Feature111111111111111111111111111111111111`.

This step is unchanged from its original procedure.

### Step 2: Staging Features for Activation

A multi-signature authority, comprised of key-holders from Solana Labs and
Expand All @@ -92,20 +89,26 @@ expects:
- Staged Features PDA: writable
- Multi-signature authority: signer

One single PDA will be used to store two lists of features:

- The list of features being considered for activation at the end of the
*current epoch*.
- The list of features newly staged for activation, to be considered for
activation in the *next epoch*.

Each list will be prefixed by the `u64` value of its corresponding epoch,
and each list will have a maximum length of 8 (ie. `[Pubkey; 8]`).

`StageFeatureForActivation` will add the provided feature ID to the **next
epoch's** Staged Features PDA.
epoch's** set of staged features.

The Staged Features PDA for a given epoch stores a list of all feature IDs that
were staged for activation during the previous epoch. This list shall have a
maximum length of 8 (ie. `[Pubkey; 8]`).
An example of how this account's state might work to coordinate both lists can
be found here:

The proposed seeds for deriving the Staged Features PDA are provided below,
where the `<epoch>` is the epoch during which the contained feature IDs will be
assessed for stake support and considered for activation.
<https://github.com/buffalojoec/feature-gate-data-poc/blob/master/src/lib.rs>

```
"staged_features" + <epoch>
```
The Staged Features PDA could be derived simply from one literal seed:
`"staged_features"`.

### Step 3: Signaling Support for Staged Features

Expand Down Expand Up @@ -142,7 +145,7 @@ nodes may still signal support for this feature. However, the runtime will not
activate this feature if its corresponding feature account no longer exists
on-chain.

### Step 4: Activation and Garbage Collection
### Step 4: Feature Activation

During the epoch rollover, the runtime uses the validator support signals to
determine which staged features to activate.
Expand All @@ -160,10 +163,8 @@ If a feature is not activated, either because it has been revoked or it did not
meet the required stake support, it must be resubmitted according to Step 2.

To ensure this new process doesn't overload the Feature Gate program's owned
accounts, during the activation stage, garbage collection will:

- Archive any activated feature accounts
- Archive this epoch's Staged Features PDA
accounts, during the activation stage, garbage collection will archive any
activated feature accounts.

The runtime "archives" an account by assigning it to the Feature Tombstone.

Expand Down