Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Commit e86539c

Browse files
committed
example fix
1 parent 0fc4c84 commit e86539c

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

zkllvm/best-practices-limitations/rust-derive.mdx

+7-9
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,18 @@ When `assigner` is called on a circuit with this struct, the circuit IR would co
4444
To avoid this problem, use the `#[repr(C)]` directive:
4545

4646
```rust
47+
48+
use ark_pallas::Fq;
49+
50+
type BlockType = [Fq; 2];
51+
4752
#[repr(C)]
4853
#[derive(Copy, Clone)]
4954
pub struct BlockDataType {
5055
prev_block_hash: BlockType,
5156
data: BlockType,
52-
validators_signatures: [EdDSASignatureType; 4],
53-
validators_keys: [EdwardsAffine; 4],
54-
}
55-
56-
#[repr(C)]
57-
#[derive(Copy, Clone)]
58-
pub struct EdDSASignatureType {
59-
r: EdwardsAffine,
60-
s: Fr,
57+
validators_signature: i32,
58+
validators_key: u64,
6159
}
6260
```
6361

0 commit comments

Comments
 (0)