-
-
Notifications
You must be signed in to change notification settings - Fork 22
Closed as not planned
Description
@nflaig noted that SSZ uses a browser compatible but slow implementation for fromHexString
ssz/packages/ssz/src/util/byteArray.ts
Lines 32 to 35 in d030130
| for (let i = 0; i < byteLen; i++) { | |
| const byte = parseInt(hex.slice(i * 2, (i + 1) * 2), 16); | |
| bytes[i] = byte; | |
| } |
We may use platform specific exports to get around it or have some logic to pick between implementations depending on platform.
Important to note that many consumers of SSZ assume everything is a Uint8Array. Buffer.slice() has different behaviour than Uint8Array.slice, so we must audit all downstream code to prevent surprises.
Metadata
Metadata
Assignees
Labels
No labels