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

Reading / writing values from / to frames is broken #206

Open
uncomputable opened this issue Feb 14, 2024 · 1 comment
Open

Reading / writing values from / to frames is broken #206

uncomputable opened this issue Feb 14, 2024 · 1 comment

Comments

@uncomputable
Copy link
Collaborator

The representation of a left value left(a): A + B is [0] * [?]^padL(A,B) * representation(a, A).
The representation of a right value right(b): A + B is [1] * [?]^padR(A,B) * representation(b, B).

Neither the read method nor the write method handle this.

I think this remained undetected because we never initialize the Bit Machine with input values, nor do we ever read output values from the final output frame.

@apoelstra
Copy link
Collaborator

To clarify, it's the read_value and write_value methods that are broken -- which indeed, are only used when providing programs with inputs or outputs.

I'm not terribly surprised these methods are broken. You're right that they've basically never been used and I guess there aren't very good tests since this predates all the ConstructNode/miniscript/text representation stuff. Sorry.

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