From a4029222fd6aa7374b394a40dd32bd418ee3ca00 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 23 Dec 2020 16:13:44 +0000 Subject: [PATCH] book: Fix book tests by adding missing definitions to SHA-256 page --- book/src/design/gadgets/sha256.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/book/src/design/gadgets/sha256.md b/book/src/design/gadgets/sha256.md index daff12f7..226fae6c 100644 --- a/book/src/design/gadgets/sha256.md +++ b/book/src/design/gadgets/sha256.md @@ -18,6 +18,15 @@ gadget to consume input in 32-bit chunks. The SHA-256 gadget requires a chip with the following instructions: ```rust +# extern crate halo2; +# use halo2::plonk::Error; +# use std::fmt; +# +# trait Chip: Sized {} +# trait Layouter {} +const BLOCK_SIZE: usize = 16; +const DIGEST_SIZE: usize = 8; + pub trait Sha256Instructions: Chip { /// Variable representing the SHA-256 internal state. type State: Clone + fmt::Debug;