Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains community-generated test vectors concerning Block sealing for primary (T=1) and fallback (T=0) cases, how to interpret their fields, and how to verify seals. The same data can be used to generate seals.
JAM Graypaper Sec 6.4 is the primary section being tested.
If you find issues, let us know in the PR and we'll try to correct them within a day or two.
If you think they are reasonable and can pass them, say so!
Overview
When sealing a block, as per GP Section 6.4, two VRF Signatures are produced by the block author using their Bandersnatch key:
The material being signed and their various inputs (c, m) depend on the block header, ticketID (T=1), entropy (eta3') and in the case of H_s, on H_v itself.
JSON Structure
Each JSON file generated has the following fields:
bandersnatch_pub
bandersnatch_priv
ticket_id
attempt
c_for_H_s
c
used to generate H_s.m_for_H_s
m
used to generate H_s.H_s
c_for_H_v
c
used to generate H_v.m_for_H_v
m
used to generate H_v. (Often empty in primary epoch flows.)H_v
eta3
T
header_bytes
This is contributed by Colorful Notion (JAM DUNA) and are not official.
Development Keys
In this PR are 6 development private / public keys derived from a "key" utility that relies on programmatically generatable seeds. All the block authoring and seals rely on these development keys. See key for details.
JAM implementers will likely need a working FFI into the W3F ietf library to pass this test vector and specifically pass the Safrole STF test vectors.
Motivation
Being able to verify and generate block seals of valid blocks are a key step of M1 and M2 competence.
We generated this to support our ability to work with others with Importblocks where any fuzzed block has to be resealed.