Skip to content

Commit 4bd7f81

Browse files
ibalajiarunclaude
andauthored
[release][v1.46] Enable ChunkyDKG Shadow V1 (#19909)
* [release] Add release yaml to enable ChunkyDKG Shadow V1 Add a governance proposal that switches the on-chain ChunkyDKG config to ConfigShadowV1 (1/2 secrecy, 2/3 reconstruction, 60s grace period), running chunky DKG alongside regular DKG. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * [release] Add release yaml to enable ChunkyDKG V1 Single-step proposal that switches the on-chain ChunkyDKG config to ConfigV1 (1/2 secrecy, 2/3 reconstruction). Assumes the encrypted-mempool framework resources are already initialized on the target network. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c044d85 commit 4bd7f81

5 files changed

Lines changed: 102 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
remote_endpoint: ~
3+
name: "enable-chunky-dkg-shadow-v1"
4+
proposals:
5+
- name: enable_chunky_dkg_shadow_v1
6+
metadata:
7+
title: "Initialize Encrypted Mempool Framework and Enable ChunkyDKG Shadow V1"
8+
description: "Initialize encrypted-mempool framework resources, then enable ChunkyDKG in shadow mode (1/2 secrecy, 2/3 reconstruction, 60s grace period)."
9+
execution_mode: MultiStep
10+
update_sequence:
11+
- RawScript: aptos-move/aptos-release-builder/data/proposals/encrypted_mempool_initialization.move
12+
- RawScript: aptos-move/aptos-release-builder/data/proposals/enable_chunky_dkg_shadow_v1.move
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
remote_endpoint: ~
3+
name: "enable-chunky-dkg-v1"
4+
proposals:
5+
- name: enable_chunky_dkg_v1
6+
metadata:
7+
title: "Enable ChunkyDKG V1"
8+
description: "Enable ChunkyDKG in full V1 mode (1/2 secrecy, 2/3 reconstruction) and turn on the encrypted_transactions feature. Assumes encrypted-mempool framework resources are already initialized."
9+
execution_mode: MultiStep
10+
update_sequence:
11+
- RawScript: aptos-move/aptos-release-builder/data/proposals/enable_chunky_dkg_v1.move
12+
- FeatureFlag:
13+
enabled:
14+
- encrypted_transactions
15+
disabled: []
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Enable ChunkyDKG in shadow mode (ConfigShadowV1).
2+
// Prerequisite: ChunkyDKG framework resources must already be initialized
3+
// (see encrypted_mempool_initialization.move).
4+
script {
5+
use aptos_framework::aptos_governance;
6+
use aptos_framework::chunky_dkg_config;
7+
use aptos_std::fixed_point64;
8+
9+
fun main(proposal_id: u64) {
10+
let framework = aptos_governance::resolve_multi_step_proposal(
11+
proposal_id,
12+
@0x1,
13+
{{ script_hash }},
14+
);
15+
16+
let config = chunky_dkg_config::new_shadow_v1(
17+
fixed_point64::create_from_rational(1, 2), // secrecy_threshold: 1/2
18+
fixed_point64::create_from_rational(2, 3), // reconstruction_threshold: 2/3
19+
60, // grace_period_secs
20+
);
21+
chunky_dkg_config::set_for_next_epoch(&framework, config);
22+
aptos_governance::reconfigure(&framework);
23+
}
24+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Enable ChunkyDKG (ConfigV1) — full activation, replacing regular DKG.
2+
// Prerequisite: ChunkyDKG framework resources must already be initialized
3+
// (see encrypted_mempool_initialization.move).
4+
script {
5+
use aptos_framework::aptos_governance;
6+
use aptos_framework::chunky_dkg_config;
7+
use aptos_std::fixed_point64;
8+
9+
fun main(proposal_id: u64) {
10+
let framework = aptos_governance::resolve_multi_step_proposal(
11+
proposal_id,
12+
@0x1,
13+
{{ script_hash }},
14+
);
15+
16+
let config = chunky_dkg_config::new_v1(
17+
fixed_point64::create_from_rational(1, 2), // secrecy_threshold: 1/2
18+
fixed_point64::create_from_rational(2, 3), // reconstruction_threshold: 2/3
19+
);
20+
chunky_dkg_config::set_for_next_epoch(&framework, config);
21+
aptos_governance::reconfigure(&framework);
22+
}
23+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Initialize on-chain resources for the encrypted mempool stack: ChunkyDKG
2+
// (config + seqnum + state), the epoch force-end watchdog, and the per-block
3+
// decryption key.
4+
//
5+
// Each `initialize` call is a no-op if its resource already exists, so this is
6+
// safe to run even if some of these resources were created previously.
7+
script {
8+
use aptos_framework::aptos_governance;
9+
use aptos_framework::chunky_dkg;
10+
use aptos_framework::chunky_dkg_config;
11+
use aptos_framework::chunky_dkg_config_seqnum;
12+
use aptos_framework::decryption;
13+
use aptos_framework::epoch_timeout_config;
14+
15+
fun main(proposal_id: u64) {
16+
let framework = aptos_governance::resolve_multi_step_proposal(
17+
proposal_id,
18+
@0x1,
19+
{{ script_hash }},
20+
);
21+
22+
chunky_dkg_config_seqnum::initialize(&framework);
23+
chunky_dkg_config::initialize(&framework, chunky_dkg_config::new_off());
24+
chunky_dkg::initialize(&framework);
25+
epoch_timeout_config::initialize(&framework);
26+
decryption::initialize(&framework);
27+
}
28+
}

0 commit comments

Comments
 (0)