-
Notifications
You must be signed in to change notification settings - Fork 45
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
deps: bump bdk to beta-2 #582
Conversation
I like it. This is starting to look good! Just writing notes here to keep track of stuff left to do:
Also thanks for the macro @rustaceanrob! It's our first in the codebase so I want to make sure we do it right. But given the extra code required to deal with generics, I suspect this might be useful in the future as well. |
Is it okay if I write a slightly more complex macro for this? Edit: We also need to implement |
Note on a required change from the Rust API: the builder pattern ending with |
I chewed on this for a while and the duplicated logic + new macros for an otherwise macro-free codebase have left a bad taste in my mouth. If future backends are made, under the current API they would also be |
@thunderbiscuit is it okay if I squash this down to a single commit? |
Open questions I have:
The current representation of pub fn persist(&self, connection: Arc<Connection>) -> bool {
let mut binding = connection.get_store();
let db: &mut BdkConnection = binding.borrow_mut();
self.get_wallet().persist(db).expect("persist failed")
} I think we should return a |
Was introduced temporarily from what I can see in the commit history, but since then it looks like we are not using it anymore because we have replaced it with more specific errors ya? (if so, we can remove |
Looks like it to me, unless I'm missing something, I don't see it being used anywhere/anymore either |
I like that idea. |
c833789
to
b59d4a4
Compare
I couldn't look at the commit history anymore. Apologies @thunderbiscuit I forgot to pick out your commits. I pushed up some changes not present in the previous commits:
|
Updated the Android and Swift tests and ran Agh. I will fix those swift tests and |
f60c773
to
8b2af25
Compare
Last try or else I will recruit Matthew for help. I've just been guessing how to pass the test cause I can't build with Update: I feel like the boy who cried wolf but I think this most recent patch should do the trick |
72a62e3
to
a747c1a
Compare
for let connection = try Connection.newInMemory()
let wallet = try Wallet(
descriptor: descriptor,
changeDescriptor: changeDescriptor,
network: .testnet,
connection: connection
) But when getting those sorts of things cleared up in OffilineWalletTests and OfflinePersistanceTests I'm still seeing failures in 4 of the other Swift tests files. Happy to be recruited for this if ya need me this week, we can do a screen share together or whatever works best- |
If these don't pass I'm happy to do a screen share or take a commit on top of this branch and merge it |
I pushed the fix. @rustaceanrob if the tests pass, you squash that last commit into yours, and then rebase on master I think this is ready to go! Will give the ACK and merge once this is all done. LET'S GO! We can then rampage on other small PRs that have been waiting for this. Superb work. I know it wasn't the easiest upgrade. |
Ok I figured out what the other issue was: the persistence was not compatible between versions, so we needed to add a new resource sqlite db to the Swift tests that was built using this version of the lib. Done. This should now pass all tests. |
You legend! I am happy to keep that commit as a moment of history, or can pull down and rebase. |
Haha 👍👍. Yeah feel free to squash and rebase. It's a bit big for a commit but whatever. Your other option is to split the source code changes and the tests changes if you prefer; I'm not picky on this. The only thing I'm picky about is I don't merge merge commits, so I always need a clean rebase. |
- temp 2 @thunder - impl wallet no persist @rob - enable default constructor on wallet type @thunder - test: fix jvm tests @thunder - add tx methods @thunder - new errors @thunder - feat: expose correct errors @thunder - remove macros for in-memory connection @rob - tests(python): add in-memory connection @rob - tests(swift, kotlin): add tests with swift failures @rob - lib: bump to bdk-wallet 1.0.0-beta2 @rob - various fixes @rob test: fix swift tests
Squashed and rebased on master. Pop the champagne Btw in the commit message I gave attribution to each of the steps to get us here. |
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.
Big time good job on this Rob! This is looking really good, the only open questions I have on this are related to testing. I'm getting failures on the Live tests (I ran all the Live+Offline tests for Swift+JVM locally). Here's an example JVM
Swift
Both platforms for this specific test get that Not sure if it's just me? For a sanity check I was looking to use our Action for live-tests on this branch but couldn't run it on this branch from my end. ~ And then just as a smaller side note, for
|
Normally I would think that is an underlying OS error where the process is over-requesting memory. If your tests run in parallel maybe try a single thread? It looks like the CI was able to run the Swift one. Otherwise that looks like an underlying
Agree that we should be consistent. I will honestly make the case that these can all be |
Good info. And yeah I’m mostly just worried about our live tests that run on a weekly basis, even thought they’ve been fails recently, but (i think) this PR helps fix that with the updated bdk_electrum so we could hopefully get back to them passing on a weekly basis. I’m not too opinionated on the direction we go here, mostly just wanted to get ya’lls feedback/thoughts/opinions. ~
I’m cool with that. |
Now that I look at it I think we might want to keep the persistence as it calls the load constructor on the wallet. I think that is a good thing to test. As @thunderbiscuit said the Swift database needs a new mock because the schemas have changed. Would it be alright if we just did a follow up PR to add back persistence to the Android and Swift tests? |
(I'm open to whatever direction we go with the tests, but I'll ACK right now just so I dont hold up wherever we go) |
@reez I can't seem to reproduce the test failures locally... but I've seen this error before. Can't quite remember what the context was. In any case if you're ok with it reez I think this is ready to go. |
Yeah that's cool, we can run that live CI on master when merged. And then the other part about consistency of in-memory/persistance being used across Swift+JVM would be good as a follow up PR. |
btw ran this PR's bindings on BDK Swift Example Wallet bitcoindevkit/BDKSwiftExampleWallet#184 and its working pretty great 📱 |
Awesome work everyone! |
Let's goooooo 🚀🚀🚀 |
Description
Notes to the reviewers
Changelog notice
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features:
Bugfixes: