Skip to content

Commit 6fd44fa

Browse files
committed
update proof reporting specification
1 parent 42136aa commit 6fd44fa

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

proposals/0204-slashable-event-verification.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ This slashing program supports two instructions `DuplicateBlockProof`, and
7171
`DuplicateBlockProof` requires 1 account and the `Instructions` sysvar:
7272

7373
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
7580

7681
`DuplicateBlockProof` has an instruction data of 273 bytes, containing:
7782

@@ -209,7 +214,7 @@ the violation type:
209214
let (pda, _) = find_program_address(&[
210215
node_pubkey.to_bytes(), // 32 byte array representing the public key
211216
slot.to_le_bytes(), // Unsigned little-endian eight-byte integer
212-
0u8, // Byte representing the violation type
217+
1u8, // Byte representing the violation type
213218
])
214219
```
215220

@@ -238,16 +243,14 @@ struct ProofReport {
238243
violation_type: u8, // Byte representing the violation type
239244
proof_account: Pubkey, // 32 byte array representing the account where
240245
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
245246
}
246247
```
247248

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.
251254

252255
The `pubkey` is populated with the `node_pubkey`. For future violation types that
253256
involve votes, this will instead be populated with the vote account's pubkey.

0 commit comments

Comments
 (0)