@@ -12,10 +12,9 @@ import "dynamic_value.proto";
12
12
package pyth_lazer_transaction ;
13
13
14
14
// Representation of a complete governance instruction. This value will be signed
15
- // by a governance source.
15
+ // by a governance source. If the governance source is Wormhole emitter, the VAA payload will
16
+ // be the encoded `GovernanceInstruction` message.
16
17
message GovernanceInstruction {
17
- // [required] Governance source that signed this instruction.
18
- optional GovernanceSource source = 1 ;
19
18
// Action requested by this instruction. For the instruction to be accepted, all directives
20
19
// must be successfully applied. In case of any failure, the whole instruction is reverted.
21
20
// However, note that if the instruction targets multiple (or all) shards, each shard will
@@ -29,14 +28,15 @@ message GovernanceInstruction {
29
28
// is greater than the specified value. After `max_execution_timestamp` is in the past,
30
29
// it will no longer be possible to execute this instruction.
31
30
optional google.protobuf.Timestamp max_execution_timestamp = 4 ;
32
- // [required] Sequence number of this instruction. It must be greater than 0.
33
- // It must always be increasing, but not required to be
34
- // strictly sequential (i.e. gaps are allowed). Each shard separately keeps track of the last executed
35
- // governance instruction and will reject instructions with the same or smaller sequence no.
36
- // Note that if instructions are received out of order, some of them may become permanently
37
- // rejected (e.g. if instruction #3 has been successfully processed before instruction #2 was observed,
38
- // #2 will always be rejected).
39
- // Sequence numbers are assigned and tracked separately for each governance source.
31
+ // [optional] Sequence number of this instruction. Required for SingleEd25519 governance source
32
+ // and optional for WomrholeEmitter governance source (because Wormhole has its own sequence
33
+ // numbers). If set, it must be greater than 0, and always be increasing, but not required to be
34
+ // strictly sequential (i.e. gaps are allowed). Each shard separately keeps track of the last
35
+ // executed governance instruction and will reject instructions with the same or smaller
36
+ // sequence no. Note that if instructions are received out of order, some of them may become
37
+ // permanently rejected (e.g. if instruction #3 has been successfully processed before
38
+ // instruction #2 was observed, #2 will always be rejected). Sequence numbers are assigned and
39
+ // tracked separately for each governance source.
40
40
optional uint32 governance_sequence_no = 5 ;
41
41
}
42
42
@@ -155,10 +155,17 @@ message GovernanceSource {
155
155
optional bytes public_key = 1 ;
156
156
}
157
157
158
+ message WormholeEmitter {
159
+ // [required] Wormhole emitter address.
160
+ optional bytes address = 1 ;
161
+ // [required] Wormhole emitter chain ID. Restricted to uint16.
162
+ optional uint32 chain_id = 2 ;
163
+ }
164
+
158
165
// [required]
159
166
oneof source {
160
167
SingleEd25519 single_ed25519 = 1 ;
161
- // TODO: wormhole source goes here.
168
+ WormholeEmitter wormhole_emitter = 2 ;
162
169
}
163
170
}
164
171
@@ -347,4 +354,3 @@ message DeactivateFeed {
347
354
// governance instruction is processed.
348
355
optional google.protobuf.Timestamp deactivation_timestamp = 1 ;
349
356
}
350
-
0 commit comments