|
|
@@ -37,16 +37,22 @@ pub struct PythDataSource {
|
|
|
pub pyth_emitter_chain: u16,
|
|
|
}
|
|
|
|
|
|
-// Guardian set information
|
|
|
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
|
|
|
pub struct ConfigInfo {
|
|
|
pub owner: Addr,
|
|
|
pub wormhole_contract: Addr,
|
|
|
pub data_sources: HashSet<PythDataSource>,
|
|
|
pub governance_source: PythDataSource,
|
|
|
- // Incrementing index for the number of times the governance data source has been changed
|
|
|
+ // Index for preventing replay attacks on governance data source transfers.
|
|
|
+ // This index increases every time the governance data source is changed, which prevents old
|
|
|
+ // transfer request VAAs from being replayed.
|
|
|
pub governance_source_index: u32,
|
|
|
- // The wormhole sequence number for governance messages
|
|
|
+ // The wormhole sequence number for governance messages. This value is increased every time the
|
|
|
+ // a governance instruction is executed.
|
|
|
+ //
|
|
|
+ // This field differs from the one above in that it is generated by wormhole and applicable to all
|
|
|
+ // governance messages, whereas the one above is generated by Pyth and only applicable to governance
|
|
|
+ // source transfers.
|
|
|
pub governance_sequence_number: u64,
|
|
|
// FIXME: This id needs to agree with the wormhole chain id.
|
|
|
// We should read this directly from wormhole.
|