@@ -71,7 +71,12 @@ This slashing program supports two instructions `DuplicateBlockProof`, and
71
71
` DuplicateBlockProof ` requires 1 account and the ` Instructions ` sysvar:
72
72
73
73
0 . ` proof_account ` , expected to be previously initialized with the proof data.
74
- 1 . ` instructions ` , Instructions sysvar
74
+ 1 . ` reporter ` , the account which will pay to store the violation report. Must be
75
+ writable.
76
+ 2 . ` pda_account ` , the PDA in which to store the violation report. See the below
77
+ section for details. Must be writable.
78
+ 3 . ` system_program_account ` , required to create the violation report.
79
+ 4 . ` instructions ` , Instructions sysvar
75
80
76
81
` DuplicateBlockProof ` has an instruction data of 273 bytes, containing:
77
82
@@ -209,7 +214,7 @@ the violation type:
209
214
let (pda , _ ) = find_program_address (& [
210
215
node_pubkey . to_bytes (), // 32 byte array representing the public key
211
216
slot . to_le_bytes (), // Unsigned little-endian eight-byte integer
212
- 0 u8 , // Byte representing the violation type
217
+ 1 u8 , // Byte representing the violation type
213
218
])
214
219
```
215
220
@@ -238,16 +243,14 @@ struct ProofReport {
238
243
violation_type : u8 , // Byte representing the violation type
239
244
proof_account : Pubkey , // 32 byte array representing the account where
240
245
the proof is stored
241
- proof_size : u32 , // Unaligned unsigned four-byte little endian
242
- integer representing the size of the serialized
243
- proof
244
- proof : & [u8 ], // Byte array of the serialized proof
245
246
}
246
247
```
247
248
248
- The ` DuplicateBlockProofData ` is serialized into the ` proof ` field. This provides
249
- an on chain trail of the reporting process, since the ` proof_account ` supplied in
250
- the ` DuplicateBlockProof ` account could later be modified.
249
+ immediately followed by a ` DuplicateBlockProofData ` .
250
+
251
+ This proof data provides an on chain trail of the reporting process, since the
252
+ ` proof_account ` supplied in the ` DuplicateBlockProof ` instruction could later
253
+ be modified.
251
254
252
255
The ` pubkey ` is populated with the ` node_pubkey ` . For future violation types that
253
256
involve votes, this will instead be populated with the vote account's pubkey.
0 commit comments