Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
Collaborator

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 join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants