Skip to content

Latest commit

 

History

History
110 lines (92 loc) · 6.24 KB

README.md

File metadata and controls

110 lines (92 loc) · 6.24 KB

Safrole Test Vectors

Both JSON and SCALE formats conform to the JAM ASN.1 schema and this subsystem STF specific schema.

⚠️ WARNING ⚠️

The ring-proof backend used by ark-ec-vrfs remains subject to modifications.

If you encounter any issues when processing these vectors, particularly regarding the verification of Bandersnatch tickets, please ensure that you are using the same version employed for the production of these vectors:

zk-SNARK SRS

Ring proofs were constructed using a SNARK built using the the Zcash SRS paramaters. (powers of tau ceremony details).

For construction and usage refer to Bandersnatch vrfs spec example.

NOTE: for "tiny" initialize the RingContext with ring_size = 6; while for full ring size = 1023.

Safrole is not Sassafras

You can use the Sassafras RFC as a guideline provided it does not conflict with the protocol described by the Graypaper If case of any discrepancy, the Graypaper must be considered the authoritative source for the JAM protocol.

Here are some key differences:

  • Safrole does not use a threshold to determine if a ticket score should be considered. A ticket is persisted in the state if the ticket accumulator is not full or if the score is lower than the highest score currently in the accumulator (which is removed after the new ticket is inserted).
  • Safrole requires the entire ticket accumulator to be filled before it can be used. If not enough tickets are received, a fallback mechanism is enacted. In contrast, Sassafras can operate with an epoch that is only partially filled with tickets.
  • In Safrole, the ticket envelope contains no additional application-specific data, it includes only the "attempt" and the "ring proof".

Most of these differences aim to provide a clear and concise protocol specification.

Tiny Vectors

Full Vectors

Currently, the same test cases as tiny vectors but at a larger scale.