Skip to content

Commit

Permalink
change to new zokrates file name pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
informartin committed Nov 29, 2019
1 parent 3f42d47 commit 33ae8db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion getHexLength.code → getHexLength.zok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "utils/pack/unpack128.code" as unpack128
import "utils/pack/unpack128.zok" as unpack128

def get_bit_length(field word) -> (field):
field[128] unpacked_word = unpack128(word)
Expand Down
2 changes: 1 addition & 1 deletion sha256only.code → sha256only.zok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "hashes/sha256/512bit.code" as sha256
import "hashes/sha256/512bit.zok" as sha256

def main(field[256] input) -> (field[256]):

Expand Down
12 changes: 6 additions & 6 deletions validate.code → validate.zok
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import "utils/pack/pack128.code" as pack128
import "utils/pack/unpack128.code" as unpack128
import "hashes/sha256/1024bit.code" as sha256for1024
import "./sha256only.code" as sha256only
import "./getHexLength.code" as getHexLength
import "utils/pack/pack128.zok" as pack128
import "utils/pack/unpack128.zok" as unpack128
import "hashes/sha256/1024bit.zok" as sha256for1024
import "./sha256only.zok" as sha256only
import "./getHexLength.zok" as getHexLength

def toBigEndian(field[32] value) -> (field[32]):
return [ \
Expand Down Expand Up @@ -138,7 +138,7 @@ def validate_target(field epoch_head, field epoch_tail, field next_epoch_head) -
delta = if target >= encoded_target_extended then delta else maxVariance + 1 fi
field valid = if delta <= maxVariance then 1 else 0 fi
//field valid = if (37202390668975264121251936602161152-81015268229227203625641762304819200) < 1267650600228229401496703205375 then 1 else 0 fi
return [valid, currentTarget]
return [valid, current_target]

def hash_block_header(field[5] preimage) -> (field[2]):
a = unpack128(preimage[0])
Expand Down

0 comments on commit 33ae8db

Please sign in to comment.