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

Type inference error when running on simplicity-sys backend #118

Open
m-kus opened this issue Mar 25, 2025 · 0 comments
Open

Type inference error when running on simplicity-sys backend #118

m-kus opened this issue Mar 25, 2025 · 0 comments
Assignees

Comments

@m-kus
Copy link

m-kus commented Mar 25, 2025

The following Simfony program results in an invalid script rejected by the Elements node:

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));
}

Corresponding program hex:

e3f4d900000000022c800000004180548142484186031d828164cdb89cd75dcbc1e84ea7a320719cbfc6dc95e5194f9eca996d55a7b2d768c511e2a310e1806216c60e671544245742660022ae160c5e14b09ec0c2a17584bf5c548c85961c02b6efc010c031590000000103822c80000000c1c182a40a05c1b2170a30445fea038d226980c2e6f7e4be9e895848d1fd97f2100db43004cb4eaddefc507820142e1c605defb50a3eeb43e8e2e90243456d2f12614b1995dc46128037a36dd3f9760030f02028fc42609bc5c4a6f13a1848e019ef88de2e7a3c1561d1828b3be0f290def9feebf54da94249472c0f0f0285c5267e0aad66c82658ec0c7f2a5a2cc38c3f61a892acd0da3a133ff9ead668873dc60f0d0284e2e3f188205bc05070a0b8880640e370

Although it runs without errors on BitMachine (after fixes from #116) the simplicity_mallocTypeInference yields SIMPLICITY_ERR_TYPE_INFERENCE_UNIFICATION.

#117 demonstrates how to reproduce the issue.

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