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

TypeInferenceUnification error when unpacking two pairs #114

Open
m-kus opened this issue Mar 19, 2025 · 3 comments
Open

TypeInferenceUnification error when unpacking two pairs #114

m-kus opened this issue Mar 19, 2025 · 3 comments

Comments

@m-kus
Copy link

m-kus commented Mar 19, 2025

I get TypeInferenceUnification error when trying to run the following program:

fn main() {
    let (a, b): (u32, u32) = (0, 1);
    assert!(jet::eq_32(a, 0));

    let (c, d): (u32, u32) = (2, 3);
    assert!(jet::eq_32(c, 2));
    assert!(jet::eq_32(d, 3));
}

This does not reproduce in BitMachine (I suppose because it does not run type checking?) but only when using https://github.com/BlockstreamResearch/rust-simplicity/blob/33b043f9a153f0d7be82dee8fbd61179ad63b888/simplicity-sys/src/tests/mod.rs#L113 (which calls the same code as Elements node under the hood).

When I'm trying to disassemble I get:

Error: failed to decode program: failed to apply bound1to existing bound2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (2^64 × (... × ...))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))): comp combinator: left target = right source

@uncomputable
Copy link
Collaborator

Interesting. I couldn't reproduce the error on the Simfony IDE, but that website is running an older version. I will try the latest version next.

@m-kus
Copy link
Author

m-kus commented Mar 20, 2025

Ok thanks! I'm using this cli tool, in case it might be handy:

cargo install --git https://github.com/keep-starknet-strange/stark-symphony --rev d552969f2c64ce9fa80dc6a45bab17a4f6204bc9 simfony-cli

Then to build & run:

simfony run main.simf
simfony build main.simf --output-format simpl

uncomputable added a commit to uncomputable/simfony that referenced this issue Mar 20, 2025
@uncomputable
Copy link
Collaborator

I could reproduce the error using your stark-symphony crate.

This bug might be related to issues on Windows (BlockstreamResearch/rust-simplicity#274) or issues with values (BlockstreamResearch/rust-simplicity#275).

I am debugging and I will publish a new version of Simfony once I'm done. I will include a unit test with your program to prevent future regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants