-
Notifications
You must be signed in to change notification settings - Fork 137
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
Improving Plan API and adding examples. #559
base: master
Are you sure you want to change the base?
Improving Plan API and adding examples. #559
Commits on Nov 11, 2023
-
Adding
all_assets
method for miniscriptUsing `all_assets` method, you can get all possible asset for a given node of Miniscript AST. Eg : multi(2,A,B,C) will give possible combinations as AB, AC, BC. This API will allow the developers to figure out all the possible spend paths for a given descriptor. Signed-off-by: Harshil Jani <harshiljani2002@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ebcc7e4 - Browse repository at this point
Copy the full SHA ebcc7e4View commit details -
Wrap
all_assets
for desc and addcount_assets
methodThis commit wraps the all_assets function for all possible descriptor types. It also adds `count_assets` function which can count the total possible ways to obtain an asset for a given descriptor. This API will help developer to count the possible ways. In-fact this will also help in protecting that if some descriptor is very large and has huge number of possible spend paths then it could simply be dropped off and we can protect the network from traffic. Signed-off-by: Harshil Jani <harshiljani2002@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 200433c - Browse repository at this point
Copy the full SHA 200433cView commit details -
Consolidated repetitive functions into
util.rs
There were helper functions to compute nCk (k combinations of n given things) and product of K different combinations. Those were duplicated in mod.rs of descriptor and astelem.rs of miniscript. This commit de-duplicates them and store them in util.rs Signed-off-by: Harshil Jani <harshiljani2002@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 50a65ca - Browse repository at this point
Copy the full SHA 50a65caView commit details -
Setting Maximum threshold for obtaining plan
For the planning module we are considering that total possible ways to spend should always be less than 1000. This protects the network from any DDoS Attack if in case you receive a very large descriptor enough that it has 1000 possible spend paths. Signed-off-by: Harshil Jani <harshiljani2002@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for aed8968 - Browse repository at this point
Copy the full SHA aed8968View commit details -
Adding new example with asset planning API
This commit adds a new example file which explains how we can use planner API with the taproot descriptor and compute different possible spend path and actually spend them. This would help developers to understand and learn new planning functionality. Signed-off-by: Harshil Jani <harshiljani2002@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 599ac6f - Browse repository at this point
Copy the full SHA 599ac6fView commit details -
Updating
psbt_sign_finalize.rs
with Plan APIRecently we have had plan API into the rust-miniscript so this example is being updated for better use of plan API with more clear explanation Signed-off-by: Harshil Jani <harshiljani2002@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d7c28c2 - Browse repository at this point
Copy the full SHA d7c28c2View commit details