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
may: batch support signal instructions
  • Loading branch information
buffalojoec committed May 16, 2025
commit e91d7d78c3a2f2d638954c7117e563f3db6c2516
48 changes: 24 additions & 24 deletions proposals/0072-feature-gate-threshold-automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ bytes, corresponding to the length of the longest variant.
```

```rust
/// Feature state v2.
///
/// All `u64` integers are represented in little-endian.
enum FeatureV2 {
/// Feature is inactive and will not be included in any support signals.
Inactive {
Expand Down Expand Up @@ -177,19 +180,20 @@ Each epoch, all nodes must load all feature accounts with feature state v2 and
signal support for any staged features they wish to see activated. Staged
features they do not wish to activate can be intentionally omitted.

Support is signaled through one or more transactions, depending on the number of
staged features in a given epoch, which contain multiple Feature Gate program
`SignalSupportForStagedFeature` instructions.
Support must be signaled through a single transaction. Depending on the number
of staged features in a given epoch, lookup tables can also be used. The
`SignalSupportForStagedFeatures` instruction requires nodes to include multiple
feature accounts after the first three required accounts.

```
Instruction: SignalSupportForStagedFeature
Instruction: SignalSupportForStagedFeatures

Choose a reason for hiding this comment

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

Would these SignalSupportForStagedFeatures transactions be treated as regular ones or fast-tracked in a similar way to vote transactions? I assume the former

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, former. I had no intention of special-casing them.

- Data:
- 1 byte: Instruction discriminator (`4`)
- Accounts:
- [s]: Authorized voter
- [w]: Validator support signal account
- [ ]: Validator vote account
- [w]: Signal account
- [w]: Feature account
- ..n [w]: `n` Feature accounts
```

The authorized voter signer must match the authorized voter stored in the vote
Expand All @@ -201,31 +205,27 @@ feature's stake support. Whenever the Clock epoch has advanced beyond the
feature account's `signal_epoch`, that value is first updated to the Clock
epoch and stake support is reset to zero before tallying the current signal.

The signal account is a PDA derived from the epoch, feature ID and vote address
The signal account is a PDA derived from the validator vote account address
to prevent double-signaling.

```
epoch_le_bytes + feature_id + vote_address
"support_signal" + vote_address
```

It contains just 8 bytes for the little-endian `u64` stake amount. These signal
accounts can serve as historical records for which nodes signaled support for
which features. They also serve as a source of truth for withdrawing support via
the `WithdrawSupportForStagedFeature` instruction, which will deduct the stored
stake value in the signal account from the feature's stake support and clear the
signal account.

```
Instruction: WithdrawSupportForStagedFeature
- Data:
- 1 byte: Instruction discriminator (`5`)
- Accounts:
- [s]: Authorized voter
- [ ]: Validator vote account
- [w]: Signal account
- [w]: Feature account
```rust
/// Feature support signal state.
///
/// All `u64` integers are represented in little-endian.
struct SupportSignal {
/// The epoch this node last submitted a support signal.
epoch: u64,
}
```

The `epoch` value serves as a reference point for preventing double-signaling
by ensuring the `epoch` value is less than the current Clock epoch at the time
of signaling.

### Activation

At the end of the epoch, the runtime loads all staged feature accounts and
Expand Down