Skip to content

Commit 8e81ea8

Browse files
authored
Merge pull request #282 from jimjimvalkema/patch-1
fix page zktrie: change the domain of nodeKey hashing to 512 instead of 256
2 parents e064a7b + 3930a4c commit 8e81ea8

File tree

1 file changed

+2
-2
lines changed
  • src/content/docs/en/technology/sequencer

1 file changed

+2
-2
lines changed

src/content/docs/en/technology/sequencer/zktrie.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ An Ethereum Account Leaf Node consists of an Ethereum address and a state accoun
106106
var address byte[20] // 20 bytes in big-endian
107107
valHi := address[0:16]
108108
valLo := address[16:20] * 2^96 // padding 12 bytes of 0 at the end
109-
nodeKey := h{256}(valHi, valLo)
109+
nodeKey := h{512}(valHi, valLo)
110110
```
111111

112112
A state account struct in the Scroll consists of the following fields (`Fr` indicates the finite field and is a 254-bit value)
@@ -182,7 +182,7 @@ A Storage Leaf Node encodes a key-value pair where both key and value are `u256`
182182
var storageKey byte[32] // 32 bytes in big-endian
183183
valHi := storageKey[0:16]
184184
valLo := storageKey[16:32]
185-
nodeKey := h{256}(valHi, valLo)
185+
nodeKey := h{512}(valHi, valLo)
186186
```
187187

188188
The storage value is a `u256` value. The `flag` for the storage value is 1, shown below.

0 commit comments

Comments
 (0)