-
Notifications
You must be signed in to change notification settings - Fork 65
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
The Great Reset #99
The Great Reset #99
Conversation
0e07ab4
to
428e919
Compare
Currently trying to pass the CI.. Might require few more updates.. |
21a9b51
to
124356b
Compare
I think I have hit a dead lock.. Our Previous CI had So Either we need to enforce that in I have updated the CI file to keep only the But I think it won't be reflected in the CI of this PR.. So tests will now always fail here.. One easy way out now is to make another PR with the CI change, get that merged, and rebase this one on top of the new CI.. Any suggestion @notmandatory ? Update: All other tests are passing except the |
CI fix PR opened here #100 |
Waiting for some concept ack on this so I can start rebasing #92 on top of this.. That will take some no trivial refactoring.. |
124356b
to
b160f31
Compare
Rebased on top of #100 to make this dependent on it.. |
b160f31
to
1f0b2f6
Compare
Removed |
1f0b2f6
to
26e40bc
Compare
Concept ACK, but looks like some tests still broken. I'm going to be tied up with a PlebFi here in LA this weekend but can spend some time reviewing next week! |
26e40bc
to
149f7e2
Compare
No issues.. I will work on fixing the tests, and then move #92 on top of it too.. |
149f7e2
to
e2e9e14
Compare
Pushed some minor doc fixes.. |
e2e9e14
to
b3d81b4
Compare
Added a commit to remove external base64 dependency + some clippy nits.. |
45df2e4
to
02fe4f8
Compare
This PR moves all the components into different module. Checkout PR description for more details.
We don't need base64 because rust-bitcoin already exposes a version of that crate that we can use. Removing one more parallel dependency.
02fe4f8
to
4e8f830
Compare
Rebased on master and removed author list changes.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't review all the code in details since most of it is existing code that was moved. But the general reorganization makes sense.
I tested the commands help and it looked OK. But the repl
command doesn't seem to be working, it won't take any command including exit, it just shows the help.
My suggestion for the changelog is something like this, based on your PR comments:
|
Thanks @notmandatory for the look.. Sorry it took me some time to get back to this.. ACK on all the comments.. Updated with a new commit for easier review.. |
I pushed a commit to fix a couple little typos and a problem I found in repl mode with command parsing, probably wasn't a new issue but noticed it when testing, had to enable clap::AppSettings::NoBinaryName. https://docs.rs/structopt/latest/structopt/trait.StructOpt.html#method.from_iter_safe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 292dd1e
292dd1e Fix repl mode command parsing (Steve Myers) 073f1c3 Update with review comments (rajarshimaitra) 4e8f830 revert author list change (rajarshimaitra) b09c405 Remove base64 dependency (rajarshimaitra) 1e70ff9 Refactor everything (rajarshimaitra) Pull request description: <!-- You can erase any parts of this template not applicable to your Pull Request. --> ### Description This is a massive refactoring PR that changes the whole structure of the crate. Previously it was written like a library to be used to create the bdk-cli app. But eventually the crate itself became the app. This PR attempts to remove the remaining lib like patterns in the code, and make it a pure binary crate. This makes the code more modular and makes it look like a typical binary rust crate. There was no real good way to structure the change into separate commits, so I made one single big one.. The best way to review is to look at the final structure of the code itself, not the change set. The crate has following modules now - `main` : The main app runtime - `commands`: Includes all the structopt commands used by bdk-cli. - `handlers`: Include all the command handlers used buy the app. - `utils`: Include all the utility and helper functions - `Backend` : Defines the backend node process, and its related methods. (This will be filled more with bitcoindevkit#92). Apart from the structure changes there are few other changes that took place - Almost all of the previous doc comments are removed. As they were written to use bdk-cli as a lib. Instead new structopts "comments" are added to describe the app functionality better. As a result the app `--help` commands are more elaborate and descriptive now. I have also removed few redundant description messages used before, that would mess up the help comments. And as a by product it solves bitcoindevkit#93. - bdk is updated to v0.19.0 - bdk-reserves is updated with current version pointing to bdk v0.19.0. - Default database is now sqlite. Overall I think I managed not to break anything. Currently this change will remove most of the previous documentation on the crate. But those aren't useful to context of bdk-cli after this change.. My proposal would be reproduce the README instructions itself in doc.rs landing page. We also need to update the README to reflect these changes.. I will open that up in a separate PR. I also haven't updated changelog yet.. Not sure yet how to describe the change in short.. Will do that once this is almost finalized.. ### Notes to the reviewers ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk-cli/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### New Features: * [ ] I've added tests for the new feature * [ ] I've added docs for the new feature * [ ] I've updated `CHANGELOG.md` ACKs for top commit: notmandatory: ACK 292dd1e Tree-SHA512: 895d8088bf93a481fd776e2ac5fe85926f13b7b4535f17b9edd3c0363a89dc3689e28c6e13dbcac3970bc00e3ff206f402e94406f3b3688c9e4a7f9d31b20e40
f8a5999 Minor grammar and puctuation fixes (Steve Myers) e7b6854 Update with Readme fixes (rajarshimaitra) 52e8c61 Add all `possible_values` to network command option (Leonardo Lima) 179618c Update crate documentation (rajarshimaitra) Pull request description: ### Description After #99 the previous documentation have been removed and new docs as per `structopts` documentation. This PR adds more documentation across the crate.. This PR is above #102 , to accommodate all the further refactoring changes. The Readme About section have been updated with more details.. Readme format made aligned with the BDK project itself.. The Readme file is used itself as the crate level documentation in docs.rs too.. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk-cli/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing ACKs for top commit: notmandatory: ACK f8a5999 Tree-SHA512: 26c5b3903b0215aa9841c4d1079bbdeb9f9d9d458c7e27dddb625db24eb364b73ca978bb2018f486215878f3601b5572ca58d5c202cb74325c992f3e7107d850
Description
This is a massive refactoring PR that changes the whole structure of the crate. Previously it was written like a library
to be used to create the bdk-cli app. But eventually the crate itself became the app. This PR attempts to remove the remaining
lib like patterns in the code, and make it a pure binary crate.
This makes the code more modular and makes it look like a typical binary rust crate.
There was no real good way to structure the change into separate commits, so I made one single big one.. The best way to review is to look at the final structure of the code itself, not the change set.
The crate has following modules now
main
: The main app runtimecommands
: Includes all the structopt commands used by bdk-cli.handlers
: Include all the command handlers used buy the app.utils
: Include all the utility and helper functionsBackend
: Defines the backend node process, and its related methods. (This will be filled more with Unleash the power of Bitcoin Core into bdk-cli #92).Apart from the structure changes there are few other changes that took place
Almost all of the previous doc comments are removed. As they were written to use bdk-cli as a lib. Instead new structopts "comments" are added to describe the app functionality better. As a result the app
--help
commands are more elaborate and descriptive now. I have also removed few redundant description messages used before, that would mess up the help comments. And as a by product it solves Bug in help doc #93.bdk is updated to v0.19.0
bdk-reserves is updated with current version pointing to bdk v0.19.0.
Default database is now sqlite.
Overall I think I managed not to break anything.
Currently this change will remove most of the previous documentation on the crate. But those aren't useful to context of bdk-cli after this change.. My proposal would be reproduce the README instructions itself in doc.rs landing page.
We also need to update the README to reflect these changes.. I will open that up in a separate PR.
I also haven't updated changelog yet.. Not sure yet how to describe the change in short.. Will do that once this is almost finalized..
Notes to the reviewers
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features:
CHANGELOG.md