You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: learn/governance/architecture.md
+76-17
Original file line number
Diff line number
Diff line change
@@ -27,28 +27,87 @@ Spoke chains handle local voting, forward votes to the hub, and execute approved
27
27
-**`SpokeVoteAggregator`** - collects votes on the spoke chain and forwards them to the hub
28
28
-**`SpokeMessageExecutor`** - receives and executes approved proposals from the hub
29
29
-**`SpokeMetadataCollector`** - fetches proposal metadata from the hub for spoke chain voters
30
-
-**`SpokeAirlock`** - acts as governance's "admin" on the spoke, has permissions and its treasury
30
+
-**`SpokeAirlock`** - acts as governance's "admin" on the spoke, has permissions, and its treasury
31
+
32
+
### Spoke Solana Staking Program
33
+
34
+
The Spoke Solana Staking Program handles local voting from users who have staked W tokens or are vested in the program, forwards votes to the hub, and executes approved proposals from the hub for decentralized governance.
35
+
36
+
The program implements its functionality through instructions, using specialized PDA accounts where data is stored. Below are the key accounts in the program:
37
+
38
+
-**`GlobalConfig`** - global program configuration
39
+
-**`StakeAccountMetadata`** - stores user's staking information
40
+
-**`CustodyAuthority`** - PDA account managing custody and overseeing token operations related to stake accounts
41
+
-**`StakeAccountCustody`** - token account associated with a stake account for securely storing staked tokens
42
+
-**`CheckpointData`** - tracks delegation history
43
+
-**`SpokeMetadataCollector`** - collects and updates proposal metadata from the hub chain
44
+
-**`GuardianSignatures`** - stores guardian signatures for message verification
45
+
-**`ProposalData`** - stores data about a specific proposal, including votes and start time
46
+
-**`ProposalVotersWeightCast`** - tracks individual voter's weight for a proposal
47
+
-**`SpokeMessageExecutor`** - processes messages from a spoke chain via the Wormhole protocol
48
+
-**`SpokeAirlock`** - manages PDA signing and seed validation for secure instruction execution
49
+
-**`VestingBalance`** - stores total vesting balance and related staking information of a vester
50
+
-**`VestingConfig`** - defines vesting configuration, including mint and admin details
51
+
-**`Vesting`** - represents individual vesting allocations with maturation data
52
+
-**`VoteWeightWindowLengths`** - tracks lengths of vote weight windows
53
+
54
+
Each account is implemented as a Solana PDA (Program Derived Address) and utilizes Anchor's account framework for serialization and management.
31
55
32
56
## System Workflow
33
57
34
-
The MultiGov system workflow details the step-by-step process for creating, voting on and executing governance proposals across connected chains, from proposal creation to final cross-chain execution.
58
+
The MultiGov system workflow details the step-by-step process for creating, voting on, and executing governance proposals across connected chains, from proposal creation to final cross-chain execution.
59
+
60
+
### EVM Governance Workflow
61
+
62
+
The EVM-based MultiGov workflow follows these steps:
63
+
64
+
1.**Proposal creation**:
65
+
1. A user creates a proposal through the `HubEvmSpokeAggregateProposer`, which checks eligibility across chains, or directly on the `HubGovernor` via the `propose` method
66
+
2. The proposal is submitted to the `HubGovernor` if the user meets the proposal threshold
67
+
2.**Proposal metadata distribution**:
68
+
1.`HubProposalMetadata` creates a custom view method to be queried for use in the `SpokeMetadataCollector`
69
+
2.`SpokeMetadataCollector` on each spoke chain queries `HubProposalMetadata` for proposal details
70
+
3.**Voting process**:
71
+
1. Users on spoke chains vote through their respective `SpokeVoteAggregators`
72
+
2.`SpokeVoteAggregators` send aggregated votes to the `HubVotePool` via Wormhole
73
+
3.`HubVotePool` submits the aggregated votes to the `HubGovernor`
74
+
4.**Vote tallying and proposal execution**:
75
+
1.`HubGovernor` tallies votes from all chains
76
+
2. If a quorum is reached and there are more for votes than against votes, the vote passes and is queued for execution
77
+
3. After the timelock delay, the proposal can be executed on the hub chain
78
+
4. For cross-chain actions, a proposal should call the `dispatch` method in the `HubMessageDispatcher`, which sends execution messages to the relevant spoke chains
79
+
5.`SpokeMessageExecutors` on each spoke chain receive and execute the approved actions through their respective `SpokeAirlocks`
80
+
81
+
### Solana Governance Workflow
82
+
83
+
The Solana-based MultiGov workflow follows these steps:
35
84
36
85
1.**Proposal creation**:
37
-
- A user creates a proposal through the `HubEvmSpokeAggregateProposer`, which checks eligibility across chains, or directly on the `HubGovernor` via the `propose` method
38
-
- The proposal is submitted to the `HubGovernor` if the user meets the proposal threshold
39
-
1.**Proposal metadata distribution**:
40
-
-`HubProposalMetadata` creates a custom view method to be queried for use in the `SpokeMetadataCollector`
41
-
-`SpokeMetadataCollector` on each spoke chain queries `HubProposalMetadata` for proposal details
42
-
1.**Voting process**:
43
-
- Users on spoke chains vote through their respective `SpokeVoteAggregators`
44
-
-`SpokeVoteAggregators` send aggregated votes to the `HubVotePool` via Wormhole
45
-
-`HubVotePool` submits the aggregated votes to the `HubGovernor`
46
-
1.**Vote tallying and proposal execution**:
47
-
-`HubGovernor` tallies votes from all chains
48
-
- If a quorum is reached and there are more for votes than against votes, the vote passes and is queued for execution
49
-
- After the timelock delay, the proposal can be executed on the hub chain
50
-
- For cross-chain actions, a proposal should call the `dispatch` method in the `HubMessageDispatcher`, which sends execution messages to the relevant spoke chains
51
-
-`SpokeMessageExecutors` on each spoke chain receive and execute the approved actions through their respective `SpokeAirlocks`
86
+
1. A user creates a proposal on `HubGovernor` by calling the `propose` method, provided they meet the proposal threshold
87
+
2. For the proposal to be executed on the Solana blockchain, a `SolanaPayload` must be generated and included in the `calldata` parameter of the `propose` function
88
+
3. The `SolanaPayload` contains encoded details specifying which instructions will be executed and which Solana program is responsible for execution
89
+
90
+
2.**Proposal metadata distribution**:
91
+
1. A user queries `getProposalMetadata` from `HubProposalMetadata` via the Wormhole query system to create a proposal on the **Spoke Solana Chain Staking Program**
92
+
2. The retrieved metadata is used in the `AddProposal` instruction in the Solana program
93
+
3. The proposal data is verified to ensure it matches the expected format
94
+
4. Guardian signatures are posted using the `PostSignatures` instruction
95
+
5. Once validated, the proposal is stored on-chain
96
+
97
+
3.**Voting process**:
98
+
1. Users vote on proposals stored in the `ProposalData` account on Solana
99
+
2. The `CastVote` instruction records their choice (`for_votes`, `against_votes`, or `abstain_votes`)
100
+
3. Eligibility and vote weight are verified using historical voter checkpoint data
101
+
4. A **Query Wormhole** request retrieves vote data from a Solana PDA
102
+
5. The signed response from Wormhole guardians is submitted to the `HubVotePool` on Ethereum for verification
103
+
6. The `crossChainVote` function in `HubVotePool` processes the validated response and forwards the aggregated vote data to the `HubGovernor` to finalize the decision
104
+
105
+
4.**Vote tallying and proposal execution**:
106
+
1.`HubGovernor` tallies votes from all chains
107
+
2. If a quorum is reached with more **for votes** than **against votes**, the proposal passes and is queued for execution
108
+
3. After the timelock delay, the proposal can be executed either on the hub chain or another chain
109
+
4. For cross-chain execution involving Solana, the proposal calls the `dispatch` method in `HubSolanaMessageDispatcher`, which sends execution messages to Solana
110
+
5. On Solana, the `ReceiveMessage` instruction processes the approved message, and the `SpokeAirlock` executes the corresponding instructions
Copy file name to clipboardexpand all lines: learn/governance/index.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ Discover everything you need to know about MultiGov, Wormhole's cross-chain gove
23
23
24
24
---
25
25
26
-
Discover an overview of MultiGov's hub-and-spoke architecture, including how it enables cross-chain governance by coordinating decision-making across blockchain.
26
+
Discover MultiGov's hub-and-spoke architecture, enabling EVM and Solana cross-chain governance through coordinated decision-making.
27
27
28
28
[:custom-arrow: Learn about MultiGov architecture](/docs/learn/governance/architecture/)
Copy file name to clipboardexpand all lines: llms.txt
+77-18
Original file line number
Diff line number
Diff line change
@@ -15229,28 +15229,87 @@ Spoke chains handle local voting, forward votes to the hub, and execute approved
15229
15229
- **`SpokeVoteAggregator`** - collects votes on the spoke chain and forwards them to the hub
15230
15230
- **`SpokeMessageExecutor`** - receives and executes approved proposals from the hub
15231
15231
- **`SpokeMetadataCollector`** - fetches proposal metadata from the hub for spoke chain voters
15232
-
- **`SpokeAirlock`** - acts as governance's "admin" on the spoke, has permissions and its treasury
15232
+
- **`SpokeAirlock`** - acts as governance's "admin" on the spoke, has permissions, and its treasury
15233
+
15234
+
### Spoke Solana Staking Program
15235
+
15236
+
The Spoke Solana Staking Program handles local voting from users who have staked W tokens or are vested in the program, forwards votes to the hub, and executes approved proposals from the hub for decentralized governance.
15237
+
15238
+
The program implements its functionality through instructions, using specialized PDA accounts where data is stored. Below are the key accounts in the program:
15239
+
15240
+
- **`GlobalConfig`** - global program configuration
15241
+
- **`StakeAccountMetadata`** - stores user's staking information
15242
+
- **`CustodyAuthority`** - PDA account managing custody and overseeing token operations related to stake accounts
15243
+
- **`StakeAccountCustody`** - token account associated with a stake account for securely storing staked tokens
15244
+
- **`CheckpointData`** - tracks delegation history
15245
+
- **`SpokeMetadataCollector`** - collects and updates proposal metadata from the hub chain
15246
+
- **`GuardianSignatures`** - stores guardian signatures for message verification
15247
+
- **`ProposalData`** - stores data about a specific proposal, including votes and start time
15248
+
- **`ProposalVotersWeightCast`** - tracks individual voter's weight for a proposal
15249
+
- **`SpokeMessageExecutor`** - processes messages from a spoke chain via the Wormhole protocol
15250
+
- **`SpokeAirlock`** - manages PDA signing and seed validation for secure instruction execution
15251
+
- **`VestingBalance`** - stores total vesting balance and related staking information of a vester
15252
+
- **`VestingConfig`** - defines vesting configuration, including mint and admin details
15253
+
- **`Vesting`** - represents individual vesting allocations with maturation data
15254
+
- **`VoteWeightWindowLengths`** - tracks lengths of vote weight windows
15255
+
15256
+
Each account is implemented as a Solana PDA (Program Derived Address) and utilizes Anchor's account framework for serialization and management.
15233
15257
15234
15258
## System Workflow
15235
15259
15236
-
The MultiGov system workflow details the step-by-step process for creating, voting on and executing governance proposals across connected chains, from proposal creation to final cross-chain execution.
15260
+
The MultiGov system workflow details the step-by-step process for creating, voting on, and executing governance proposals across connected chains, from proposal creation to final cross-chain execution.
15261
+
15262
+
### EVM Governance Workflow
15263
+
15264
+
The EVM-based MultiGov workflow follows these steps:
15265
+
15266
+
1. **Proposal creation**:
15267
+
1. A user creates a proposal through the `HubEvmSpokeAggregateProposer`, which checks eligibility across chains, or directly on the `HubGovernor` via the `propose` method
15268
+
2. The proposal is submitted to the `HubGovernor` if the user meets the proposal threshold
15269
+
2. **Proposal metadata distribution**:
15270
+
1. `HubProposalMetadata` creates a custom view method to be queried for use in the `SpokeMetadataCollector`
15271
+
2. `SpokeMetadataCollector` on each spoke chain queries `HubProposalMetadata` for proposal details
15272
+
3. **Voting process**:
15273
+
1. Users on spoke chains vote through their respective `SpokeVoteAggregators`
15274
+
2. `SpokeVoteAggregators` send aggregated votes to the `HubVotePool` via Wormhole
15275
+
3. `HubVotePool` submits the aggregated votes to the `HubGovernor`
15276
+
4. **Vote tallying and proposal execution**:
15277
+
1. `HubGovernor` tallies votes from all chains
15278
+
2. If a quorum is reached and there are more for votes than against votes, the vote passes and is queued for execution
15279
+
3. After the timelock delay, the proposal can be executed on the hub chain
15280
+
4. For cross-chain actions, a proposal should call the `dispatch` method in the `HubMessageDispatcher`, which sends execution messages to the relevant spoke chains
15281
+
5. `SpokeMessageExecutors` on each spoke chain receive and execute the approved actions through their respective `SpokeAirlocks`
15282
+
15283
+
### Solana Governance Workflow
15284
+
15285
+
The Solana-based MultiGov workflow follows these steps:
15237
15286
15238
15287
1. **Proposal creation**:
15239
-
- A user creates a proposal through the `HubEvmSpokeAggregateProposer`, which checks eligibility across chains, or directly on the `HubGovernor` via the `propose` method
15240
-
- The proposal is submitted to the `HubGovernor` if the user meets the proposal threshold
15241
-
1. **Proposal metadata distribution**:
15242
-
- `HubProposalMetadata` creates a custom view method to be queried for use in the `SpokeMetadataCollector`
15243
-
- `SpokeMetadataCollector` on each spoke chain queries `HubProposalMetadata` for proposal details
15244
-
1. **Voting process**:
15245
-
- Users on spoke chains vote through their respective `SpokeVoteAggregators`
15246
-
- `SpokeVoteAggregators` send aggregated votes to the `HubVotePool` via Wormhole
15247
-
- `HubVotePool` submits the aggregated votes to the `HubGovernor`
15248
-
1. **Vote tallying and proposal execution**:
15249
-
- `HubGovernor` tallies votes from all chains
15250
-
- If a quorum is reached and there are more for votes than against votes, the vote passes and is queued for execution
15251
-
- After the timelock delay, the proposal can be executed on the hub chain
15252
-
- For cross-chain actions, a proposal should call the `dispatch` method in the `HubMessageDispatcher`, which sends execution messages to the relevant spoke chains
15253
-
- `SpokeMessageExecutors` on each spoke chain receive and execute the approved actions through their respective `SpokeAirlocks`
15288
+
1. A user creates a proposal on `HubGovernor` by calling the `propose` method, provided they meet the proposal threshold
15289
+
2. For the proposal to be executed on the Solana blockchain, a `SolanaPayload` must be generated and included in the `calldata` parameter of the `propose` function
15290
+
3. The `SolanaPayload` contains encoded details specifying which instructions will be executed and which Solana program is responsible for execution
15291
+
15292
+
2. **Proposal metadata distribution**:
15293
+
1. A user queries `getProposalMetadata` from `HubProposalMetadata` via the Wormhole query system to create a proposal on the **Spoke Solana Chain Staking Program**
15294
+
2. The retrieved metadata is used in the `AddProposal` instruction in the Solana program
15295
+
3. The proposal data is verified to ensure it matches the expected format
15296
+
4. Guardian signatures are posted using the `PostSignatures` instruction
15297
+
5. Once validated, the proposal is stored on-chain
15298
+
15299
+
3. **Voting process**:
15300
+
1. Users vote on proposals stored in the `ProposalData` account on Solana
15301
+
2. The `CastVote` instruction records their choice (`for_votes`, `against_votes`, or `abstain_votes`)
15302
+
3. Eligibility and vote weight are verified using historical voter checkpoint data
15303
+
4. A **Query Wormhole** request retrieves vote data from a Solana PDA
15304
+
5. The signed response from Wormhole guardians is submitted to the `HubVotePool` on Ethereum for verification
15305
+
6. The `crossChainVote` function in `HubVotePool` processes the validated response and forwards the aggregated vote data to the `HubGovernor` to finalize the decision
15306
+
15307
+
4. **Vote tallying and proposal execution**:
15308
+
1. `HubGovernor` tallies votes from all chains
15309
+
2. If a quorum is reached with more **for votes** than **against votes**, the proposal passes and is queued for execution
15310
+
3. After the timelock delay, the proposal can be executed either on the hub chain or another chain
15311
+
4. For cross-chain execution involving Solana, the proposal calls the `dispatch` method in `HubSolanaMessageDispatcher`, which sends execution messages to Solana
15312
+
5. On Solana, the `ReceiveMessage` instruction processes the approved message, and the `SpokeAirlock` executes the corresponding instructions
15254
15313
15255
15314
## Cross-Chain Communication
15256
15315
@@ -15327,7 +15386,7 @@ Discover everything you need to know about MultiGov, Wormhole's cross-chain gove
15327
15386
15328
15387
---
15329
15388
15330
-
Discover an overview of MultiGov's hub-and-spoke architecture, including how it enables cross-chain governance by coordinating decision-making across blockchain.
15389
+
Discover MultiGov's hub-and-spoke architecture, enabling EVM and Solana cross-chain governance through coordinated decision-making.
15331
15390
15332
15391
[:custom-arrow: Learn about MultiGov architecture](/docs/learn/governance/architecture/)
0 commit comments