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

Remove all recursion #115

Open
uncomputable opened this issue Jun 10, 2023 · 1 comment
Open

Remove all recursion #115

uncomputable opened this issue Jun 10, 2023 · 1 comment

Comments

@uncomputable
Copy link
Collaborator

Rust's default stack size is 2 MiB. Simplicity has tree structures that easily exceed this size. (This is ameliorated by consensus limits, but there is still a risk.) Recursive algorithms may stack-overflow which leads to weird errors and confusion. Therefore we should remove all recursion from the library and instead rely on iteration. Also, new algorithms should not use recursion.

@sanket1729
Copy link
Member

Cross-linking Andrew's research: rust-bitcoin/rust-miniscript#484.

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