Skip to content

Strange behavior of periodic columns #397

@iStrannik

Description

@iStrannik

I came across a strange behavior in the periodic columns. Sometimes they don't return the value I expect.

Steps to reproduce

  1. clone the repo
  2. Add debug-string here
    debug_assert!(hash_flag == E::from(BaseElement::new(0)) || hash_flag == E::from(BaseElement::new(1)), "Hash_flag must be 0 or 1 but it is {hash_flag}");
  3. build in debug mode and run ./target/debug/winterfell rescue
  4. Get the error
thread 'main' panicked at examples/src/rescue/air.rs:99:9:
Hash_flag must be 0 or 1 but it is 12411149292880158513719697302446626514

In rescue hash_flag is defined to be zero or one. Why is it 12411149292880158513719697302446626514?
Is this expected behaviour?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions