Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Proposed tree hashing test suite format #14

Open
jannikluhn opened this issue Jan 15, 2019 · 1 comment
Open

Proposed tree hashing test suite format #14

jannikluhn opened this issue Jan 15, 2019 · 1 comment

Comments

@jannikluhn
Copy link
Contributor

In addition to plain SSZ tests, we need standardized tests for the related tree hashing algorithm following the general test format. Proposed format:

Test suite name

tree_hashing

Test case format

type: <type def string>
value: <value to hash>
result: <tree hash>

For type and value definition, we use the same format as in the SSZ tests.

The result is encoded as hex with a 0x prefix.

Example

title: uint tree hashing
test_suite: tree_hashing
fork: all
version: "0.1"

test_cases:

- type: uint8
  value: 0
  result: "0x0000000000000000000000000000000000000000000000000000000000000000"

- type: uint384
  value: 0
  result: "0xc980e59163ce244bb4bb6211f48c7b46f88a4f40943e84eb99bdc41e129bd293"
@djrtwo
Copy link
Contributor

djrtwo commented Jan 15, 2019

What's an example of the format for a container type?

EDIT: They are specified in #8! whoops

@hwwhww hwwhww transferred this issue from ethereum/eth2.0-tests Feb 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants